Repository navigation
[VARIANT] Add support for the json_to_variant API - #7783
Merged
Merged
Conversation
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.
Which issue does this PR close?
Rationale for this change
Explained in the issue.
What changes are included in this PR?
This PR includes a
json_to_variantAPI to parse JSON strings as Variants.json_to_varianttakes as argument the input JSON string and an objectbuilderof typeVariantBuilderand builds the variant usingbuilder. The resulting variant can be extracted usingbuilder.finish()which consumes the builder and returns the Variant buffers.Are these changes tested?
Unit Tests, and an example file.
Are there any user-facing changes?
Yes, the PR introduces the
json_to_variantAPI.