Skip to content

update cpp-jsonnet to (unreleased) 833f18402b6b#860

Merged
johnbartholomew merged 2 commits intogoogle:masterfrom
johnbartholomew:update-cpp-jsonnet
Mar 8, 2026
Merged

update cpp-jsonnet to (unreleased) 833f18402b6b#860
johnbartholomew merged 2 commits intogoogle:masterfrom
johnbartholomew:update-cpp-jsonnet

Conversation

@johnbartholomew
Copy link
Collaborator

No description provided.

@johnbartholomew
Copy link
Collaborator Author

Has at least one problem: #861

This doesn't make them fully correct, in particular directives sections
(e.g., "%YAML 1.2" directive before a document start marker) are not
handled correctly, but they weren't handled correctly before, either.

It also doesn't recognise or try to do anything about document end
markers (`...`).

This fix does allow scalar documents to be on the same line as the
document start tag which is valid per examples in the YAML spec,
see for example https://yaml.org/spec/1.2.1/#id2760844
(YAML 1.2.1 spec, section 2.3 Scalars)

It also matches the C++ jsonnet output for std.parseYaml("42\n---"),
which is a stream of two documents, a scalar and then an empty document
(where the empty document is interpreted as JSON null)
@johnbartholomew johnbartholomew merged commit 509404f into google:master Mar 8, 2026
9 checks passed
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