counterorbit.json provides a DOM-like API for JSON data. counterorbit.json is available for .NET.
Downloads are available on the Files page.
This project is distributed under the GNU Lesser General Public License version 3.
counterorbit.json provides a DOM-like API for JSON data. counterorbit.json is available for .NET.
Downloads are available on the Files page.
This project is distributed under the GNU Lesser General Public License version 3.
The JsonKind enumeration defines constants, one for each kind of JSON value.
The JsonFactory creates new IJsonValue objects either by parsing JSON text or by converting .NET types.
JsonFactoryException if there is an error parsing the JSON data. (Added in 0.1.2; previously this method returned null.)The counterorbit.json library implements a universal object pattern. Each value implements the IJsonValue interface. It is never necessary to cast IJsonValue objects to some other class or interface. The entire functionality of the API is available through the IJsonValue interface, although not every operation is supported for every kind of value.
The conversion methods convert an IJsonValue to a native representation. The conversion methods throw NotSupportedException when a conversion isn't supported for a particular kind of value.
The conversion methods have a generous definition of compatibility. For example, if a value is a JSON string that contains valid numeric data, then the numeric conversions will succeed for that value. The exact compatibility for each conversion method is listed below.
IJsonValue does not implement ICollection (for technical reasons) but it supports all of the usual ICollection methods. Use the ToList method if you want an actual ICollection value.
0 for other kinds of JSON values.IJsonValue is read-only. It returns false for array and object JSON values and true for all other kinds of values.false for other kinds of JSON values.true if the item was a member of the array value. It only works for array values. It always returns false for other kinds of JSON values. IJsonValue does not implement IDictionary (for technical reasons) but it supports all of the usual IDictionary methods. Use the ToDictionary method if you want an actual IDictionary value.
IJsonValue does not implement IList (for technical reasons) but it supports all of the usual IList methods. Use the ToList method if you want an actual IList value.