Re: [swift-users] Parsing Decimal values from JSON

2017-10-31 Thread Rimantas Liubertas via swift-users
> > 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

Re: [swift-users] Parsing Decimal values from JSON

2017-10-30 Thread Rimantas Liubertas via swift-users
> > 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

Re: [swift-users] JSON keys survey

2017-06-23 Thread Rimantas Liubertas via swift-users
> 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

Re: [swift-users] Are value semantics really appropriate in a diagramming app?

2016-08-01 Thread Rimantas Liubertas via swift-users
> 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: