-
Notifications
You must be signed in to change notification settings - Fork 197
Sync JSON web decoders #1028
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
Merged
Merged
Sync JSON web decoders #1028
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
649e1a1
Split protobuf package into libraries
osa1 35bb15a
Also make consts a lib
osa1 9a2207f
Make utils a lib
osa1 8b59a1d
Make PbFieldType stuff public
osa1 0a5d2b2
Sync web decoders
osa1 32911d8
Export ExtensionRegistry
osa1 e821977
Revert "Export ExtensionRegistry"
osa1 877adf8
Update GeneratedMessage.{writeToJson,mergeFromJson}
osa1 11eecbc
Remove unused member
osa1 83390ea
Fix js_interop usage in serialization
osa1 96b5dc0
Fix sint serialization
osa1 afd49a7
Remove a dynamic invo
osa1 9cb7ca2
Merge remote-tracking branch 'origin/master' into split_into_libs
osa1 9a49d17
Merge branch 'split_into_libs' into field_type_public
osa1 43a04ff
Merge branch 'field_type_public' into web_json_decoder
osa1 c5acfd3
Fix warning
osa1 be75e06
Revert some of the changes
osa1 1096ccc
Merge branch 'split_into_libs' into field_type_public
osa1 3f14114
Merge branch 'field_type_public' into web_json_decoder
osa1 34afcf8
Revert renaming
osa1 f302178
Revert renaming
osa1 85b6747
Merge branch 'split_into_libs' into field_type_public
osa1 a187a9d
Revert renaming
osa1 af07865
Merge branch 'field_type_public' into web_json_decoder
osa1 38e9653
Formatting
osa1 6763a79
Use the old library with Wasm
osa1 0184a4c
Merge branch 'split_into_libs' into field_type_public
osa1 72663fa
Merge branch 'field_type_public' into web_json_decoder
osa1 1423191
Merge branch 'master' into web_json_decoder
osa1 d7f09dc
Update CHANGELOG
osa1 fb94c55
Merge remote-tracking branch 'origin/master' into web_json_decoder
osa1 7df422f
Address some of the comments
osa1 22968ec
Make members private
osa1 7a72bf0
Merge remote-tracking branch 'origin/master' into web_json_decoder
osa1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file | ||
| // for details. All rights reserved. Use of this source code is governed by a | ||
| // BSD-style license that can be found in the LICENSE file. | ||
|
|
||
| import 'dart:convert' show jsonDecode, jsonEncode; | ||
|
|
||
| import '../internal.dart'; | ||
| import 'json.dart'; | ||
|
|
||
| String writeToJsonString(FieldSet fs) => jsonEncode(writeToJsonMap(fs)); | ||
|
|
||
| /// Merge fields from a [json] string. | ||
| void mergeFromJsonString( | ||
| FieldSet fs, | ||
| String json, | ||
| ExtensionRegistry? registry, | ||
| ) { | ||
| final jsonMap = jsonDecode(json); | ||
| if (jsonMap is! Map<String, dynamic>) { | ||
| throw ArgumentError.value(json, 'json', 'Does not parse to a JSON object.'); | ||
| } | ||
| mergeFromJsonMap(fs, jsonMap, registry); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.