Skip to content

Commit e28c488

Browse files
committed
add json encode test
1 parent fa43f2c commit e28c488

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sql/types/json_encode_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ newlines
106106
val: decimal.New(123, -2),
107107
expected: "1.23",
108108
},
109+
{
110+
name: "formatted key strings",
111+
val: map[string]interface{}{
112+
"baz\n\\n": "qux",
113+
"foo\"": "bar\t",
114+
},
115+
expected: `{"foo\"": "bar\t", "baz\n\\n": "qux"}`,
116+
},
109117
}
110118

111119
for _, test := range tests {

0 commit comments

Comments
 (0)