Is JSON.Net guaranteed to always serialize the same thing?

I need to generate a 'string' key based on the state of the object. I was thinking about serializing a JSON object and using the result as a key. This only works if JSON.Net is always serialized in the same way.

Is JSON.Net guaranteed to serialize in the same way on the same computer if an object of the same class with the same state, if encountered?

+3


source to share


1 answer


Yes, otherwise the hardware tests will fail.



The JsonPropertyAttribute has an Order property if you want to explicitly specify the order.

+4


source







All Articles