>
> Swift shouldn't be forced to adhere to the limitations of JavaScript. Just
> because JS doesn't know about decimals doesn't mean swift can't do better.
>
JSON does not know about decimals either. http://json.org/. If you need
some custom data type you can always pass it as a string and then
>
> It seems that the JSON decoder parses it as Double then converts it to
> Decimal which introduces errors in the parsing. That behavior is in fact
> incorrect.
>
Why do you say that? JS in JSON stand for JavaScript, and Javascript has
now idea about neither Decimal nor Integer numbers.
Best
> This has come up a few times in recent threads, and I wanted to gather
> some additional info on your real world use cases. Just reply to me, and
> any input is appreciated:
>
> 1. Does your JSON use snake_case_keys or CamelCase or other?
>
It depends on whether API is intended to be used with
> Similarly, in the diagramming example from the WWDC videos, how would that
> app handle the user editing existing Drawables in the Diagram? Let's say
> you allow the user to click on a Drawable and drag it to another location
> in the canvas. Is this reasonable:
>
See this talk too: