JsonFormat is the contract for serializing messages to and from JSON. Implementations may be specific to a proto syntax, and can be reflection based, or delegate to speed optimized generated code.

Hierarchy

  • JsonFormat

Methods

  • Returns a short string representation of a JSON value, suitable for error messages.

    Parameters

    Returns string

  • Provide options for parsing JSON data.

    Parameters

    Returns Readonly<JsonReadOptions>

  • Parse a message from JSON.

    Type Parameters

    Parameters

    Returns T

  • Parse a single scalar value from JSON. This method may throw an error, but it may have a blank error message. Callers are expected to provide context.

    Parameters

    Returns any

  • Serialize a message to JSON.

    Parameters

    Returns JsonValue

  • Serialize a single scalar value to JSON.

    Parameters

    • type: ScalarType
    • value: any
    • emitDefaultValues: boolean

    Returns undefined | JsonValue

Generated using TypeDoc