On Monday, 1 August 2022 at 07:35:34 UTC, Christian Köstlin wrote:
[...]
```
An arguably shorter solution (that drops some of your logging) could be:

```d
import std;

void main() {
    dirEntries(".", "*.json", SpanMode.shallow)
        .filter!(f => !f.name.canFind("output"))
        .map!(readText)
        .map!(parseJSON)
.fold!((result, json) { result ~= json.array; return result; })
        .toPrettyString
        .reverseArgs!(std.file.write)("output-combined.json");
}
```

Is there an implementation which does not interpret the objects in the array:

Case 1
```
[{"A":"A","A":"B"}] -> [
    {
        "A": "B"
    }
]
```

Case 2
```
[1.0000000000000001] -> [
    1.0
]
```

Case 3
```
[99999999999999999999] -> std.conv.ConvOverflowException@...Overflow in integral conversion
```



Reply via email to