Re: [swift-corelibs-dev] JSONDecoder has too few opportunities. need an enhancement.

2017-11-10 Thread Itai Ferber via swift-corelibs-dev
Hi Vladimir, > On Nov 9, 2017, at 8:36 AM, Vladimir Kushelkov via swift-corelibs-dev > wrote: > > 1. Sometimes it is contently to be able to decode a struct or an object from > a Foundation object (either NSArray or NSDictionary) that produce a valid > JSON. > For example, if I use a 3d party

Re: [swift-corelibs-dev] JSONDecoder has too few opportunities. need an enhancement.

2017-11-10 Thread Vladimir Kushelkov via swift-corelibs-dev
Hi Norio, thank you for your answer. I’ve looked thought you library. So, basically, you took/copied the source code of JSONDecoder/JSONEncoder. Now I’m using ObjectMapper. I don’t want to replace the one with you library. I wish I could remove this dep

Re: [swift-corelibs-dev] JSONDecoder has too few opportunities. need an enhancement.

2017-11-09 Thread Norio Nomura via swift-corelibs-dev
Hi Vladimir, FYI, I also wanted to decode directly from NSDictionary and NSArray, so I made https://github.com/norio-nomura/ObjectEncoder. It is a simpler implementation than JSONEncoder/JSONDecoder because it does not contain any functions to treat specific type specially. 2017-11-10 1:37 GMT+09

[swift-corelibs-dev] JSONDecoder has too few opportunities. need an enhancement.

2017-11-09 Thread Vladimir Kushelkov via swift-corelibs-dev
1. Sometimes it is contently to be able to decode a struct or an object from a Foundation object (either NSArray or NSDictionary) that produce a valid JSON. For example, if I use a 3d party library that provides NSDictionary to me. Due to JSONDecoder decodes only from Data, in the first place I h