awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
square avatar

square/moshi

0
View on GitHub↗
10,138 stars·804 forks·Kotlin·Apache-2.0·7 vuessquare.github.io/moshi/1.x↗

Moshi

Moshi is a JSON serialization library and parser for Kotlin and Java. It functions as a reflectionless JSON encoder that converts typed objects to JSON strings and parses JSON data back into language objects.

The library distinguishes itself through compile-time adapter generation, which removes the performance overhead associated with runtime reflection. It also provides a polymorphic JSON mapper that uses type identifiers to resolve and instantiate specific subclasses of a common base type.

The framework supports custom adapter definitions for specialized type conversion, including nullability constraint enforcement and contextual encoding via qualifiers. Its mapping capabilities cover field renaming, enum fallback management, property exclusion, and value class inlining. Additionally, it provides low-level streaming tools for raw value processing and non-destructive token peeking.

Features

  • JSON Serialization Libraries - Functions as a high-performance library for converting Kotlin and Java objects to and from JSON.
  • Compile-Time Code Generation - Produces optimized serialization logic at compile time to eliminate the performance overhead of runtime reflection.
  • Custom Type Converters - Provides mechanisms to define specific logic for converting complex objects to control the resulting JSON string format.
  • JSON Converters - Provides a framework for defining custom converters to handle specialized type transformations during JSON serialization.
  • JSON-to-Model Mappers - Converts JSON strings into typed language objects by mapping keys to class fields.
  • Custom Field Mapping - Provides customization of object field mapping to JSON keys using annotations to bridge naming conventions.
  • JSON Parsers - Implements a JSON parser specifically optimized for Kotlin, supporting null safety and code generation.
  • Reflectionless Encoders - Provides a reflectionless encoding mechanism using compile-time generated adapters for maximum performance.
  • Type Safe Parsing - Ensures data integrity by mapping JSON input to strongly typed objects with strict nullability enforcement.
  • JSON Serialization - Parses classes, primitives, and collections into JSON strings and back using built-in or generated logic.
  • Adapter-Based Mapping - Implements a system of dedicated adapters to map JSON keys to class properties and vice versa.
  • Reflectionless Serialization - Uses compile-time adapter generation to eliminate the performance costs associated with runtime reflection.
  • Serialization Adapters - Provides modular components that encapsulate custom logic for converting specific data types during serialization.
  • Contextual Serialization Rules - Uses qualifiers to apply different encoding rules to the same data type based on the specific field context.
  • Data Parsing Utilities - Converts complex types like dates into standard objects using prebuilt adapters during the parsing process.
  • Polymorphic Mapping - Embeds type identifiers in the JSON to resolve and instantiate specific subclasses of a common base type.
  • Token-Based Stream Parsing - Reads JSON data as a sequence of tokens allowing for peek operations without consuming the underlying stream.
  • Compositional Wrappers - Wraps existing adapters in modifiers to add behavioral logic like null safety or data transformation.
  • Nullability Constraint Enforcement - Enables the creation of adapters that forbid nulls in the data body and fail immediately when encountered.
  • Contextual Encoding Qualifiers - Uses qualifiers to apply different encoding rules to the same data type based on the specific field context.
  • Traitement JSON - Modern, unopinionated JSON library using standard Java types.
  • Android Development Utilities - Modern JSON library for Android and Java.
  • Data Serialization - Modern JSON library for Android and Java.

Historique des stars

Graphique de l'historique des stars pour square/moshiGraphique de l'historique des stars pour square/moshi

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Alternatives open source à Moshi

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Moshi.
  • fasterxml/jacksonAvatar de FasterXML

    FasterXML/jackson

    9,740Voir sur GitHub↗

    Jackson is a Java data binding framework and multi-format data serializer used to translate data structures into native language objects. It functions as a JSON data binding library and a streaming parser that reads and writes data as discrete tokens to process large datasets with minimal memory. The project distinguishes itself through a bytecode serialization accelerator that replaces standard reflection with generated bytecode to increase data binding speed. It employs a module-based extensibility model to support a wide range of formats beyond JSON, including XML, YAML, CSV, TOML, and bin

    hacktoberfestjacksonjava-json
    Voir sur GitHub↗9,740
  • google/gsonAvatar de google

    google/gson

    24,357Voir sur GitHub↗

    Gson is a Java library designed for the serialization and deserialization of objects into structured text formats. It functions as a reflection-based data mapper, inspecting class structures at runtime to automatically convert memory-resident objects into data representations and reconstruct them back into typed language objects. The library distinguishes itself through a modular type-adapter pattern that allows for custom conversion rules for complex or nested structures. It also provides robust support for production environments by generating build-time metadata and configuration rules, wh

    Java
    Voir sur GitHub↗24,357
  • ijl/orjsonAvatar de ijl

    ijl/orjson

    8,110Voir sur GitHub↗

    orjson is a high-performance Python library for serializing and deserializing JSON data. It functions as both a JSON parsing library and a serialization engine, converting data between native Python objects and UTF-8 encoded bytes. The project provides specialized support for converting complex Python data structures, including dataclasses, datetime objects, and NumPy arrays and scalars, into JSON format. It also allows for the insertion of pre-serialized JSON blobs into documents to maintain processing speed. The library includes capabilities for memory-efficient deserialization through key

    Pythondataclassesdatetimedeserialization
    Voir sur GitHub↗8,110
  • alibaba/fastjsonAvatar de alibaba

    alibaba/fastjson

    25,625Voir sur GitHub↗

    Fastjson is a Java data binding framework and serialization library designed to convert objects to JSON strings and parse JSON data into typed objects. It functions as a JSON parser and stream processor capable of transforming JSON strings into data structures. The project emphasizes high performance JSON processing and memory management, specifically through the use of a pipeline to stream oversized JSON objects and texts to prevent memory exhaustion. It provides capabilities for JSON data serialization and deserialization workflows, including custom JSON data mapping and the ability to def

    Java
    Voir sur GitHub↗25,625
Voir les 30 alternatives à Moshi→

Questions fréquentes

Que fait square/moshi ?

Moshi is a JSON serialization library and parser for Kotlin and Java. It functions as a reflectionless JSON encoder that converts typed objects to JSON strings and parses JSON data back into language objects.

Quelles sont les fonctionnalités principales de square/moshi ?

Les fonctionnalités principales de square/moshi sont : JSON Serialization Libraries, Compile-Time Code Generation, Custom Type Converters, JSON Converters, JSON-to-Model Mappers, Custom Field Mapping, JSON Parsers, Reflectionless Encoders.

Quelles sont les alternatives open-source à square/moshi ?

Les alternatives open-source à square/moshi incluent : fasterxml/jackson — Jackson is a Java data binding framework and multi-format data serializer used to translate data structures into… google/gson — Gson is a Java library designed for the serialization and deserialization of objects into structured text formats. It… ijl/orjson — orjson is a high-performance Python library for serializing and deserializing JSON data. It functions as both a JSON… alibaba/fastjson — Fastjson is a Java data binding framework and serialization library designed to convert objects to JSON strings and… alibaba/handyjson — HandyJSON is a Swift JSON serialization library and data mapper. It functions as an object mapper that converts JSON… codermjlee/mjextension — MJExtension is a JSON serialization library and model mapping framework used to convert data between JSON strings and…