Fork JmesPath.Net for unity3D
Add
"com.devlab.jmespath": "https://github.com/grownith/JmesPath.Net/",
To manifest.json
A fully compliant implementation of JMESPATH for .Net Core.
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");