[swift-corelibs-dev] That's Confirmed The JSON foundation Bug SR-6631, is a Bug in Darwin's Objc Foundations.

Benoit Pereira da silva bpds at me.com
Tue Dec 19 02:22:55 CST 2017


Dear All,


Philippe Hausler has emitted the hypothesis that https://bugs.swift.org/browse/SR-6631 was a bug in Darwin Objc Foundations.
He was right! Shall i close the Swift SR-6631? 

The following Objc Implementation is faulting:

 #import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // Let's set to french
        setlocale(LC_ALL,"fr_FR");
        NSDictionary *dictionary = @{@"decimalValue":@1.1};
        NSError* error = nil;
        NSData* data = [NSJSONSerialization dataWithJSONObject:dictionary options:kNilOptions error:&error];
        NSString * json = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        NSLog(@"%@",json);
    }
    return 0;
}


Result :  2017-12-19 09:08:49.657316+0100 doubleEncodingObjc[2016:82301] {"decimalValue":1,1000000000000001}



I’have been updating the relevant radar: https://bugreport.apple.com/web/?problemID=36107307



Benoit



Benoit Pereira da Silva
Ultra Mobile Developer & Movement Activist
Développeur Ultra Mobile & Militant du mouvement
https://pereira-da-silva.com <https://pereira-da-silva.com/>





✄ --------------------------------
This e-mail is confidential. Distribution, copy, publication or use of this information for any purpose is prohibited without agreement of the sender.
Ce message est confidentiel. Toute distribution, copie, publication ou usage des informations contenues dans ce message sont interdits sans agrément préalable de l'expéditeur.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20171219/66e55a7b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bannerp.jpg
Type: image/jpeg
Size: 27829 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20171219/66e55a7b/attachment.jpg>


More information about the swift-corelibs-dev mailing list