diff options
| author | korvahkh <92224397+korvahkh@users.noreply.github.com> | 2024-05-27 16:59:46 -0500 |
|---|---|---|
| committer | korvahkh <92224397+korvahkh@users.noreply.github.com> | 2024-05-27 16:59:46 -0500 |
| commit | a7a6ff8c693be92929327660fd446dfc0af62e01 (patch) | |
| tree | 9b9b21d3205387cb52a332f7953e60e784ce4f08 /src/llvm_backend.cpp | |
| parent | 75f1215ed283e29dda4b8c84ac8929d7d54189e5 (diff) | |
encoding/json: Fix struct marshal() emitting comma after omitted field
Previously:
```odin
package main
import "core:fmt"
import "core:encoding/json"
T :: struct {
a: string `json:",omitempty"`,
b: string,
}
main :: proc() {
data, _ := json.marshal(T{b = "foo"})
fmt.println(string(data))
}
```
would output:
```
{,"b":"foo"}
```
which is not correct.
Also cleaned up some whitespace while I'm at it.
Diffstat (limited to 'src/llvm_backend.cpp')
0 files changed, 0 insertions, 0 deletions