ios – How can I import JSONSerialization.swift supply code into my very own mission?

I cloned Apple’s JSONSerialization supply code and moved JSONSerialization.swift and JSONSerialization+Parser.swift into my mission.

As a result of I wish to perceive how Apple applied their JSON parser. I renamed a bit from JSONSerialization -> JSONSerializationRS to keep away from any naming battle, however

Nonetheless I obtained error, like this:

Can't use class 'NSObject' right here; 'ObjectiveC' has been imported as implementation-only


This is among the file:

Why is that this line exist within the prime of the supply code?

@_implementationOnly import CoreFoundation

What do I have to get it up and operating, and capable of debug their code with my very own JSON?

Obtained following error additionally:

Can't discover sort '_NSNumberCastingWithoutBridging' in scope
Can't discover sort 'NSNull' in scope

I suppose I have to activate solely a flag, however which flag?

Leave a Reply