Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

.net has a polymorphic serializer where the output json contains a $type field for deserializer to choose the concrete type.

It needs to be the very first key in the object. I’ve been bitten by this because postgresql’s jsonb also does not preserve the key ordering.

I believe the latest .net release addresses this but key ordering does matter sometimes.



When order is important it can be maintained by an external layer with, e.g. a an encoding into a list of pairs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: