Is there a simple method to convert any object to JSON in Android?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
Might be better choice:
This how you can convert a JSON string to JSON Object natively without using any external libraries and get corresponding values for a key. Hopefully the below should work.
Spring for Android do this using RestTemplate easily:
As of Android 3.0 (API Level 11) Android has a more recent and improved JSON Parser.
http://developer.android.com/reference/android/util/JsonReader.html
Most people are using gson: https://github.com/google/gson