JSON serializer/deserializer strictness

BW
Brian White
Wed, Mar 5, 2014 9:41 PM

I noticed that JsonDocument expects both all defined values to be set and
that those values to be in a specific order. This makes it impossible for
example to pass in a JSON string like '{ "idUri": "sip:192.168.100.10" }'
for reading into a TransportConfig object.

Is there currently any easy way to work around these issues?

  • Brian
I noticed that JsonDocument expects both all defined values to be set and that those values to be in a specific order. This makes it impossible for example to pass in a JSON string like '{ "idUri": "sip:192.168.100.10" }' for reading into a TransportConfig object. Is there currently any easy way to work around these issues? - Brian
BP
Benny Prijono
Thu, Mar 6, 2014 3:09 AM

On Thu, Mar 6, 2014 at 4:41 AM, Brian White mscdex@mscdex.net wrote:

I noticed that JsonDocument expects both all defined values to be set and
that those values to be in a specific order. This makes it impossible for
example to pass in a JSON string like '{ "idUri": "sip:192.168.100.10" }'
for reading into a TransportConfig object.

Is there currently any easy way to work around these issues?

Probably no. Why do want it like that though?

Best regards,
Benny

On Thu, Mar 6, 2014 at 4:41 AM, Brian White <mscdex@mscdex.net> wrote: > I noticed that JsonDocument expects both all defined values to be set and > that those values to be in a specific order. This makes it impossible for > example to pass in a JSON string like '{ "idUri": "sip:192.168.100.10" }' > for reading into a TransportConfig object. > > Is there currently any easy way to work around these issues? > > > Probably no. Why do want it like that though? Best regards, Benny