jsonstreams icon indicating copy to clipboard operation
jsonstreams copied to clipboard

Indentation incorrect for array at top level

Open Bjwebb opened this issue 3 years ago • 0 comments

Example:

import jsonstreams

with jsonstreams.Stream(jsonstreams.Type.array, filename='test.json', indent=4) as s:
    s.write({"a": 1, "b": 2})

Actual test.json:

[
    {
    "a": 1,
    "b": 2
}
]

Expected test.json:

[
    {
        "a": 1,
        "b": 2
    }
]

Bjwebb avatar Apr 14 '21 15:04 Bjwebb