0

Possible Duplicate:
JSON order mixed up

By Microsoft convension i need send Json as String where __type going first.

But in Android when i try send json object as StringEntity and then JSONObject calls toString method it's mix fields and __type goes second.

On net deserialization site it's crashes becuase it's cant deserialize object.

How solve its?

Community
  • 1
  • 1
Dmitry Nelepov
  • 7,206
  • 6
  • 51
  • 71

1 Answers1

1

Fields in a JSON object are inherently unordered; see JSON order mixed up.

If you need a specific ordering, you will have to manually build the JSON data.

Community
  • 1
  • 1
Graham Borland
  • 58,983
  • 20
  • 134
  • 177