mbraceproject / FsPickler

A fast multi-format message serializer for .NET
http://mbraceproject.github.io/FsPickler/
MIT License
323 stars 54 forks source link

Less verbose Json format for Tuples/DUs #101

Closed cotyar closed 6 years ago

cotyar commented 6 years ago

Hi Eirik, How difficult it be (and is it actually possible) to setup FsPickler to generate/parse Json for Tuples and DUs in a more compact way (say similar to FSharpLu) please?

Thanks Yuriy

eiriktsarpalis commented 6 years ago

It is possible (but difficult) to influence the serialization format using custom pickler combinators. That said, using format-idiomatic value representation was never a design goal for this library. Please refer to the main page for a quick introduction. If controlling the json format is important for your use case, I suggest you use a serialization library like JSON.net.

cotyar commented 6 years ago

Thank you for your reply Eirik. It FSharpLu is based on JSON.net anyway and kind of does the job ... but the result is an order of magnitude slower comparing to this awesome library ;-) Will continue playing with the TypeShape json example. Thanks again. Yuriy