swift-extras-json icon indicating copy to clipboard operation
swift-extras-json copied to clipboard

JSON encoding and decoding without the use of Foundation in pure Swift.

Results 11 swift-extras-json issues
Sort by recently updated
recently updated
newest added
trafficstars

It would be great, if this library could eventually support [JSON5](https://json5.org), which comes with a bundle of amazing features. Foundation on macOS supports it by now (through [`.json5Allowed`](https://developer.apple.com/documentation/foundation/jsonserialization/readingoptions/3746916-json5allowed)), but it...

This PR adds the following extensions to the `JSONValue` enum: - Conformances to various `ExpressibleByXLiteral` protocols (so e.g. `let x: JSON = ["y": [ "z": [1, 2.2, false]]]` is possible)...

This is an idea on improving the encoding speed. Doesn't seem to work though.

Decimals are originally meant to be encoded/decoded as a dictionary: https://github.com/apple/swift/blob/3978d81c840c899bd090243d7d344f8dceacd74b/stdlib/public/Darwin/Foundation/Decimal.swift#L118 Apple's JSONDecoder provides a way to decode them from single numbers but sadly numbers are parsed as Double by...

I thought the whole point of this library was that one DIDN'T need to use Encodable and Decodable? I am trying desperately to solve the problem of precision in floating...

This is more of a question than a bug. I am trying to find a way to encode a decimal value with the proper precision. For example, with a precision...

https://github.com/nst/JSONTestSuite http://seriot.ch/parsing_json.php

enhancement

1. Setup memory allocation tracking: https://github.com/apple/swift-nio/blob/master/docs/debugging-allocations.md

performance

We need more tests for the encoder. It's test coverage is rather bad right now: https://codecov.io/gh/fabianfett/pure-swift-json/tree/master/Sources/PureSwiftJSONCoding/Encoding PRs are very welcome.

good first issue