Skip to content

Parse JSON into Java objects instead of JSONObject #235

@b95505017

Description

@b95505017

There are some of libraries e.g. Gson, Moshi, will help us parse json string into java object.

If public void call(Object... args) { could return the java object instead of JSONObject, I think it will be more convenient.

For example, in Retrofit, we could define the response java object, after response returned, it will call converters to help parsing the response string into java object, then we could use them directly instead of get the value one by one from JSONObject.

Encoder could also use Gson/Moshi to convert java object into json string automatically and send it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions