Standard: Abstraction for json serialization

Created on 7 Oct 2016  路  1Comment  路  Source: dotnet/standard

I figured I'd lift a little conversation with @terrajobst from the comments of the netstandard blogpost to here for better visibility :)

Me:

I鈥檇 love to see standard interfaces for json serialization that json.net and others implement. there are other json serializers out there, like Jil and service stack, that don鈥檛 get the attention they deserve

@terrajobst:

Interesting. What would these interfaces provide that a generic data pipeline (such as Streams) wouldn鈥檛 achieve?

Me:

Besides having a common interface for doing the actual serialization/deserialization(that people usually end up defining them selves in every project), they could include stuff for setting names of json properties or otherwise customizing the serialization process. Similar to how data annotations provide an abstract way to annotate classes for ui that then can be used by different implementations

What do you think? I understand it's pretty late in the game for NetStandard 2.0 but I think it would be very useful. Maybe it doesn't even have to be specific to json but like a general way to abstract naming members for serialization and actually performing the serialization/deserialization

Most helpful comment

Brand new APIs are out-of-scope for .NET Standard. We only standardize APIs that already exist. Requests for new APIs should go against https://github.com/dotnet/corefx.

That being said, I think the proposal is interesting and I'd like to discuss it over in CoreFx 馃槃

>All comments

Brand new APIs are out-of-scope for .NET Standard. We only standardize APIs that already exist. Requests for new APIs should go against https://github.com/dotnet/corefx.

That being said, I think the proposal is interesting and I'd like to discuss it over in CoreFx 馃槃

Was this page helpful?
0 / 5 - 0 ratings