Skip to content

[Go] Escape control characters as \u00XX in generated flyweight JSON strings - #1193

Open
slachiewicz wants to merge 1 commit into
aeron-io:masterfrom
slachiewicz:go-flyweight-json-escape-control-chars
Open

slachiewicz wants to merge 1 commit into
aeron-io:masterfrom
slachiewicz:go-flyweight-json-escape-control-chars

Conversation

@slachiewicz

Copy link
Copy Markdown
Contributor

The generated flyweight Get<X>AsJsonEscapedString wrote control characters with %x, so "a\x01b" became a1b: the escape was dropped and the value lost. It now writes them as \u00XX, which round-trips through a JSON parser.

Part of #969.

Verified: TestJsonEscapedStringEscapesControlCharacters fails on master (a1\"b1f) and passes here; sbe-tool checkstyle and test, verifyJavaIrCodecsInSync, sbe-samples check and gocode make pass.

…strings.

Get<X>AsJsonEscapedString wrote control characters with %x, which dropped the escape and lost the value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant