Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JSON serialization docs #741

Merged
merged 2 commits into from
Mar 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/runtime_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,16 @@ Options for `Message.fromBinary`:

Options for `Message.fromJson` and `Message.fromJsonString`:

- `ignoreUnknownFields?: boolean`<br/>
By default, unknown properties are rejected.
This option overrides this behavior and ignores properties, as
well as unrecognized enum string representations.
- `typeRegistry?: IMessageTypeRegistry & Partial<IExtensionRegistry>`<br/>
A registry to parse [extensions](#extensions-and-json) and
[google.protobuf.Any](#any) from JSON.

Options for `Message.toJson` and `Message.toJsonString`:

- `emitDefaultValues?: boolean`<br/>
Fields with default values are omitted by default in JSON output.
This option overrides this behavior and outputs fields with
Expand All @@ -969,16 +979,6 @@ Options for `Message.fromJson` and `Message.fromJsonString`:
option to `JSON.stringify`, which controls indentation for prettier output.
See the [`JSON.stringify` docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#parameters).

Options for `Message.toJson` and `Message.toJsonString`:

- `ignoreUnknownFields?: boolean`<br/>
By default, unknown properties are rejected.
This option overrides this behavior and ignores properties, as
well as unrecognized enum string representations.
- `typeRegistry?: IMessageTypeRegistry & Partial<IExtensionRegistry>`<br/>
A registry to parse [extensions](#extensions-and-json) and
[google.protobuf.Any](#any) from JSON.


### JSON.stringify

Expand Down
Loading