tidwall / sjson

Set JSON values very quickly in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

when i update to 1.1.0, error

chenyiping111 opened this issue · comments

{
"_source": [
"_id"
],
"from": 0,
"query": {
"bool": {
"must_not": [
{
"term": {
"is_deleted": true
}
}
],
"filter": [
{
"terms": {
"_id": [
"56d87325dabfae2eee03f325",
"58774c630a3ac5b5de64f6a2"
]
}
}
]
}
},
"size": 1000,}
"aggs": {
"sample": {
"aggs": {
"org": {
"terms": {
"field": "authors.org.keyword",
"execution_hint": "map",
"size": 20
}
}
}
}
}
}

when i use SetRaw(str,"aggs",aggStr) it return me result above.

there is a no need "}" after ""size": 1000," can you repair it ?

Can you provide a reproducible example that includes the JSON before calling SetRaw, the SetRaw command that you used, and the result?

I found the problem and pushed a fix. Thanks for reporting.