BT

Json.NET No Longer Has over 120 Dependencies

| by Jonathan Allen Follow 547 Followers on Feb 26, 2018. Estimated reading time: 1 minute |

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 Stage
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.

Tell us what you think

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

Email me replies to any of my messages in this thread
Community comments

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT