Skip to content

#340 - [api] Add support for 'pre-encoded keys' #344

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rbygrave
Copy link

@rbygrave rbygrave commented Dec 14, 2021

Refer to #340

Create a JsonGenerator.Key

JsonProvider provider = ...;

JsonGenerator.Key firstNameKey = provider.createGeneratorKey("firstName");

Use a JsonGenerator.Key

JsonGenerator generator = ...;

// we can use the key rather than just a string key for performance reasons
// ... it's already escaped 
generator.writeKey(firstNameKey).write("foo");

// rather than string key 
generator.writeKey("lastName").write("foo");

@rbygrave
Copy link
Author

rbygrave commented Feb 8, 2022

Is anything happening with this in terms of getting a review?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant