fastjson

repository·master·Indexed 12 days ago

https://github.com/alibaba/fastjson

A high-performance Java library for serializing Java objects to JSON and deserializing JSON strings back into Java objects. It supports arbitrary Java objects, deep inheritance hierarchies, and Java Generics, providing a simple API via toJSONString() and parseObject(). Version 2.0.x is recommended for improved performance and security.

Tokens
388
Snippets
2
Records
4
Agent score
48%

What's inside fastjson

  1. Overview of fastjson

    master

    fastjson is a Java library designed for high-performance conversion between Java objects and JSON strings. It supports arbitrary Java objects, including those without available source code, and handles complex scenarios such as deep inheritance hierarchies and extensive use of Java Generics.

    Key Features:

    • High performance on server-side and Android clients.
    • Simple API via toJSONString() and parseObject().
    • Support for pre-existing unmodifiable objects.
    • Support for custom object representations.

    Note on Versioning: Fastjson 2.0.x is available and is recommended for better performance and security. If you are using 1.x, consider upgrading.

  2. Install fastjson via Maven

    master

    To add fastjson to your Java project using Maven, include the following dependency in your pom.xml.

    Note: The version in the example below is 2.0.31. Always check Maven Central for the most recent version.

    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>fastjson</artifactId>
        <version>2.0.31</version>
    </dependency>