-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add serialization of field values #5072
Merged
BeksOmega
merged 3 commits into
google:project-cereal
from
BeksOmega:cereal/field-serialiation
Jul 30, 2021
Merged
Add serialization of field values #5072
BeksOmega
merged 3 commits into
google:project-cereal
from
BeksOmega:cereal/field-serialiation
Jul 30, 2021
Conversation
This file contains 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
BeksOmega
changed the title
Cereal/field serialiation
Add serialization of field values
Jul 15, 2021
BeksOmega
requested review from
maribethb and
alschmiedt
and removed request for
moniika
July 15, 2021 14:54
3 tasks
BeksOmega
added
breaking change
Used to mark a PR or issue that changes our public APIs.
and removed
breaking change
Used to mark a PR or issue that changes our public APIs.
labels
Jul 16, 2021
alschmiedt
reviewed
Jul 23, 2021
core/serialization/blocks.js
Outdated
* inline: ?boolean, | ||
* data: ?string, | ||
* extra-state: * | ||
* fields: ?Object<string, *> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be !Object<string, *>|undefined
? since I think if we don't have any fields this does not get set?
alschmiedt
approved these changes
Jul 23, 2021
BeksOmega
force-pushed
the
cereal/field-serialiation
branch
from
July 30, 2021 15:18
c540903
to
5008d5f
Compare
BeksOmega
added a commit
to BeksOmega/blockly
that referenced
this pull request
Sep 13, 2021
* Add tests for field serialization * Add field serialization * Fixup types and tests
BeksOmega
added a commit
that referenced
this pull request
Sep 17, 2021
* Add tests for field serialization * Add field serialization * Fixup types and tests
alschmiedt
pushed a commit
to alschmiedt/blockly
that referenced
this pull request
Sep 20, 2021
* Add tests for field serialization * Add field serialization * Fixup types and tests
alschmiedt
pushed a commit
that referenced
this pull request
Sep 20, 2021
* Add tests for field serialization * Add field serialization * Fixup types and tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The basics
Link for Diff: BeksOmega/blockly@cereal/mutator-serialization...BeksOmega:cereal/field-serialiation
The details
Resolves
Work on project cereal.
Dependent on #5054
Proposed Changes
Adds serializing field values to JSOs.
Does not handle deserialization.
Reason for Changes
Serializing state is good.
Test Coverage
Added tests for different categories of types the field could return. Also added a test for wrapping the default XML implementation.
Additional Information
I got rid of one of the outer suites, so the test file looks like I made a lot of changes when I didn't. The new field tests are at the bottom of the file.
I'm also planning on adding tests for individual fields as I add JSO serialization to them.