Android Fastjson

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

Fastjson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object.

Fastjson Features:

Provide best performance in server side and android client

Provide simple toJSONString() and parseObject() methods to convert Java objects to JSON and vice-versa

Allow pre-existing unmodifiable objects to be converted to and from JSON

Extensive support of Java Generics

Syntax

  • Object parse(String text)
  • JSONObject parseObject(String text)
  • T parseObject(String text, Class<T> clazz)
  • JSONArray parseArray(String text)
  • <T> List<T> parseArray(String text, Class<T> clazz)
  • String toJSONString(Object object)
  • String toJSONString(Object object, boolean prettyFormat)
  • Object toJSON(Object javaObject)


Got any Android Question?