gregsdennis / Manatee.Json

A fully object-oriented approach to JSON manipulation, validation, and serialization that focuses on modeling the JSON structure rather than mere string parsing and conversion.
MIT License
198 stars 32 forks source link

Question about (self) serialization #284

Open pekaaw opened 3 years ago

pekaaw commented 3 years ago

I've got a problem when serializing an object into json. The object contains JsonValue instances, but those are returned as empty objects even though they have content. What am I doing wrong?

The question is asked here: https://stackoverflow.com/questions/64029011/how-to-serialize-manatee-json-jsonvalue

I'll gladly provide any information that I've failed to give.

gregsdennis commented 3 years ago

Hm... I could have sworn I implemented a serializer for JsonValue-typed values.

You can implement an ISerializer yourself and register it. Instructions are here.

Unfortunately, I don't have time to do this myself (as simple as it should be). If you would like to submit a PR, I'd be happy to review it.

pekaaw commented 3 years ago

Thank you for the response 👍

From what you write, I understand that it should be possible to register an ISerializer that will be called for JsonValue. I'll look into it and see what I can find.

Are these the instructions you point to, or is there another url?

gregsdennis commented 3 years ago

Yeah. Those are the instructions. Meant to link to the rendered site, but that'll do.