Skip to content

A JSONDecoder that correctly preserves the values of floating point numbers

Notifications You must be signed in to change notification settings

Qata/MonadicJSON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MonadicJSON

The JSONDecoder supplied by Foundation is currently broken when it comes to isomorphic decoding of JSON numbers with fractional precision (what would be decoded to Float, Double and Decimal). You can read about the issue on the Swift bugtracker.

This project does not aim to be faster than the built-in JSONSerialization-based JSONDecoder, simply to be correct. Tests have shown a significant slowdown when using this decoder over the inbuilt one, so if you don't need absolute precision, do not use this decoder.

This project is not intended as a permanent replacement for JSONDecoder, but purely as a stopgap until SR-7054 is resolved.

About

A JSONDecoder that correctly preserves the values of floating point numbers

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages