All Projects → jdevillard → JmesPath.Net

jdevillard / JmesPath.Net

Licence: Apache-2.0 License
A fully compliant implementation of JMESPATH for .NetCore

Programming Languages

C#
18002 projects
Yacc
648 projects
powershell
5483 projects
Lex
420 projects

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");
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].