Skip to content

Commit

Permalink
Add FAQ for deterministic serialization (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
timostamm authored Sep 30, 2024
1 parent 34128f5 commit a3e43df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2495,6 +2495,10 @@ If you see the following error with [Metro] or [Expo], make sure to [enable pack
Metro error: Unable to resolve module @bufbuild/protobuf/codegenv1
```

### Is serialization deterministic?

Serialization to JSON and binary is deterministic within a version of protobuf-es, but map entries, repeated fields and extensions are ordered by insertion. Regular fields are sorted by field number.

[@bufbuild/buf]: https://www.npmjs.com/package/@bufbuild/buf
[@bufbuild/protobuf]: https://www.npmjs.com/package/@bufbuild/protobuf
[@bufbuild/protoc-gen-es]: https://www.npmjs.com/package/@bufbuild/protoc-gen-es
Expand Down

0 comments on commit a3e43df

Please sign in to comment.