Skip to content

A fully compliant implementation of JMESPATH for .NetCore

License

Notifications You must be signed in to change notification settings

rateitapp/JmesPath.Net

 
 

Repository files navigation

JmesPath.Net

A fully compliant implementation of JMESPATH for .Net Core.

Build status

Getting started

Using the parser

JmesPath.Net uses Newtonsoft.Json to handle JSON and comes with a simple to use parser:

using DevLab.JmesPath;

const string input = @"{ \"foo\": \"bar\" }";
const string expression = "foo";

var jmes = new JmesPath();
var result = jmes.Transform(input, expression);

The JmesPath.Transform method accepts and produces well formed JSON constructs (object, array or string, boolean, number and null values). In the example above, the result is a JSON string token, including the quotes.

using Newtonsoft.Json.Linq;

System.Diagnostics.Debug.Assert(result == "\"bar\"");

var token = JToken.Parse(result);
var text = token.ToString();

System.Diagnostics.Debug.Assert(text == "bar");

About

A fully compliant implementation of JMESPATH for .NetCore

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 96.3%
  • Yacc 1.9%
  • PowerShell 1.1%
  • Lex 0.7%