ffjson icon indicating copy to clipboard operation
ffjson copied to clipboard

Extra space in serialized json

Open CAFxX opened this issue 8 years ago • 0 comments

I'm trying ffjson in a project of ours but found that it sometimes emits extra spaces after the opening brackets in the generated JSON:

{ "origin":"fake-origin-1","logMessage":{ "message":"aGVsbG8="}}

I couldn't quickly come up with a minimal test case, but I pushed my WIP branch to Github:

https://github.com/rakutentech/kafka-firehose-nozzle/blob/misc-improvements/ext/ext.go (struct definition) https://github.com/rakutentech/kafka-firehose-nozzle/blob/misc-improvements/encoder_test.go#L11 (test case; see the extra space after the opening brackets) https://github.com/rakutentech/kafka-firehose-nozzle/blob/misc-improvements/ext/ext_ffjson.go#L37 (ffjson-generated code showing the extra space)

CAFxX avatar May 29 '17 02:05 CAFxX