BT

InfoQ Homepage News Json.NET No Longer Has over 120 Dependencies

Json.NET No Longer Has over 120 Dependencies

Bookmarks

Json.NET is the official JSON parsing and serialization library for .NET, superseding the libraries that were actually shipped by Microsoft. However, when it came time to port it to .NET Standard, there were several problems. Aside from the numerous methods that were simply not available on that platform, Json.NET on .NET Standard 1.3 required a whopping 122 packages. With the release of Json.NET 11 for .NET Standard 2.0, those problems have been eliminated.

The huge package count is not actually the fault of Json.NET itself. Rather, it is a side effect of taking a dependency on NETStandard.Library 1.6.1, which libraries targeting .NET Standard 1.3 and earlier are dependent on.

Json.NET 11 also adds a generic JsonConverter<T>. This allows developers to create custom serialization rules for a single type without the complexity and boilerplate code needed to implement the original JsonConverter class.

Also new to this release is a UnixDateTimeConverter. This is used when dates need to be stored as an integer derived from the Unix epoch.

JSON Path Support

Unlike SQL and XPath, there is no standard for querying JSON data beyond the blog post on JSON Path from 2007. Subsequently, projects such as Json.NET have added their own extensions. Exposed via the =~ operator, Json.NET now supports regular expressions in JSON Path.

Json.NET is released by James Newton-King under the MIT License.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.