Skip to content

Conversation

@ThomasAdam
Copy link
Contributor

When emitting json, if there were two or more repeated sections, such
as:

section_a { key_1 = "value_1"; }
section_a { key_2 = "value_2"; }
section_b { key_3 = "value_3"; }

The emitter would get confused, and assume the new section (section_b)
is part of the same config, and emit extraneous delimiters.

Instead, let the finidh object function determine when these delimiters
should be used.

Fixes #312

When emitting json, if there were two or more repeated sections, such
as:

  section_a { key_1 = "value_1"; }
  section_a { key_2 = "value_2"; }
  section_b { key_3 = "value_3"; }

The emitter would get confused, and assume the new section (section_b)
is part of the same config, and emit extraneous delimiters.

Instead, let the finidh object function determine when these delimiters
should be used.

Fixes vstakhov#312
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.

Invalid JSON emission when merging objects

1 participant