Sorry, the diff of this file is not supported yet
+3
-4
@@ -5,3 +5,3 @@ <?xml version="1.0" encoding="utf-8"?> | ||
| <id>JsonPath</id> | ||
| <version>2.1.0</version> | ||
| <version>2.0.0</version> | ||
| <authors>wolfspelz</authors> | ||
@@ -12,9 +12,8 @@ <license type="expression">MIT</license> | ||
| <projectUrl>https://github.com/wolfspelz/JsonPath</projectUrl> | ||
| <description>A .NET library for extracting values from JSON with simple expressions, similar to XPath for XML but type-safe. Supports JSON, XML and YAML parsing with intuitive syntax like json[2]["aNumber"] and LINQ integration.</description> | ||
| <description>A .NET library for extracting values from JSON with simple expressions, similar to XPath for XML but type-safe. Supports JSON and XML parsing with intuitive syntax like json[2]["aNumber"] and LINQ integration.</description> | ||
| <tags>json xml path query parser xpath linq JSON Parser JsonPath XPath POCO</tags> | ||
| <repository type="git" url="https://github.com/wolfspelz/JsonPath" commit="8c5e049ccf84e1e9c4ab9a85aa130497da98059f" /> | ||
| <repository type="git" url="https://github.com/wolfspelz/JsonPath" commit="870054a274de6798f11063c4cf4ab1b575bfd091" /> | ||
| <dependencies> | ||
| <group targetFramework="net8.0"> | ||
| <dependency id="Newtonsoft.Json" version="13.0.3" exclude="Build,Analyzers" /> | ||
| <dependency id="YamlDotNet" version="13.1.0" exclude="Build,Analyzers" /> | ||
| </group> | ||
@@ -21,0 +20,0 @@ </dependencies> |
+2
-35
@@ -20,12 +20,3 @@ # JsonPath | ||
| // Parse JSON | ||
| var json = Node.FromJson(""" | ||
| [ | ||
| "1st", | ||
| "2nd", | ||
| { | ||
| "aString": "Hello World", | ||
| "aNumber": 42 | ||
| } | ||
| ] | ||
| """); | ||
| var json = Node.FromJson("[ \"1st\", \"2nd\", { \"aString\": \"Hello World\", \"aNumber\": 42 } ]"); | ||
@@ -52,12 +43,3 @@ // Extract values | ||
| ```csharp | ||
| // Parse YAML | ||
| var xml = Node.FromXml(""" | ||
| <root> | ||
| <item>1st</item> | ||
| <item>2nd</item> | ||
| <item> | ||
| <aNumber>42</aNumber> | ||
| </item> | ||
| </root> | ||
| """); | ||
| var xml = Node.FromXml("<root><item>1st</item><item>2nd</item><item><aNumber>42</aNumber></item></root>"); | ||
| var number = xml[Xml.Children][2][Xml.Children] | ||
@@ -67,17 +49,2 @@ .AsList.FirstOrDefault(x => x[Xml.Name] == "aNumber")?[Xml.Text].AsInt; | ||
| ## YAML Support | ||
| ```csharp | ||
| var xml = Node.FromYaml(""" | ||
| doc: | ||
| - item: 1st | ||
| - item: 2nd | ||
| - aString: Hello World | ||
| aNumber: 42 | ||
| """); | ||
| int number = json[2]["aNumber"]; | ||
| ``` | ||
| ## Installation | ||
@@ -84,0 +51,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet