mirror of
https://github.com/google/go-jsonnet.git
synced 2025-09-29 01:11:02 +02:00
Actually unparse field names
Instead of just wrapping in "".
This commit is contained in:
parent
860c3e6e70
commit
6b040a9afe
@ -591,9 +591,7 @@ func (i *interpreter) manifestJSON(trace *TraceElement, v value, multiline bool,
|
|||||||
buf.WriteString(prefix)
|
buf.WriteString(prefix)
|
||||||
buf.WriteString(indent2)
|
buf.WriteString(indent2)
|
||||||
|
|
||||||
buf.WriteString("\"")
|
buf.WriteString(unparseString(fieldName))
|
||||||
buf.WriteString(fieldName)
|
|
||||||
buf.WriteString("\"")
|
|
||||||
buf.WriteString(": ")
|
buf.WriteString(": ")
|
||||||
|
|
||||||
// TODO(sbarzowski) body.Loc()
|
// TODO(sbarzowski) body.Loc()
|
||||||
|
5
testdata/escaped_fields.golden
vendored
Normal file
5
testdata/escaped_fields.golden
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"\n\n": null,
|
||||||
|
"\"": null,
|
||||||
|
"'": null
|
||||||
|
}
|
8
testdata/escaped_fields.input
vendored
Normal file
8
testdata/escaped_fields.input
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
'"': null,
|
||||||
|
"'": null,
|
||||||
|
|||
|
||||||
|
|
||||||
|
|
||||||
|
|||: null,
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user