raymccrae / swift-jsonpatch Goto Github PK
View Code? Open in Web Editor NEWJSON Patch RFC6902 implementation in Swift
License: Apache License 2.0
JSON Patch RFC6902 implementation in Swift
License: Apache License 2.0
Is there any intention to support Linux with this library? In case it's helpful, I'm getting these errors when attempting to build:
#18 2.911 [14/884] Compiling JSONPatch JSONElement.swift
#18 2.911 /build/.build/checkouts/swift-jsonpatch/Sources/JSONPatch/JSONElement.swift:161:59: error: 'NSDictionary' is not convertible to '[AnyHashable : Any]'
#18 2.911 let mutable = NSMutableDictionary(dictionary: dictionary)
#18 2.911 ^
#18 2.911 /build/.build/checkouts/swift-jsonpatch/Sources/JSONPatch/JSONElement.swift:161:59: note: did you mean to use 'as!' to force downcast?
#18 2.911 let mutable = NSMutableDictionary(dictionary: dictionary)
#18 2.911 ^
#18 2.911 as! [AnyHashable : Any]
#18 2.911 /build/.build/checkouts/swift-jsonpatch/Sources/JSONPatch/JSONEquality.swift:29:16: error: cannot find 'CFNumberGetType' in scope
#18 2.911 return CFNumberGetType(self) == .charType
#18 2.911 ^~~~~~~~~~~~~~~
#18 2.911 /build/.build/checkouts/swift-jsonpatch/Sources/JSONPatch/JSONEquality.swift:29:42: error: cannot infer contextual base in reference to member 'charType'
#18 2.911 return CFNumberGetType(self) == .charType
#18 2.911 ~^~~~~~~~
#18 2.911 /build/.build/checkouts/swift-jsonpatch/Sources/JSONPatch/JSONPatchCodable.swift:157:16: error: cannot find 'CFNumberGetType' in scope
#18 2.911 switch CFNumberGetType(value) {
#18 2.911 ^~~~~~~~~~~~~~~
#18 2.911 /build/.build/checkouts/swift-jsonpatch/Sources/JSONPatch/NSDictionary+DeepCopy.swift:31:23: error: cannot assign through subscript: subscript is get-only
#18 2.911 result[key] = array.deepMutableCopy()
#18 2.911 ~~~~~~^~~~~
#18 2.913 error: fatalError
Iโm using your library in an open source project that is distributed by means of SPM. Now I want to release it on Cocoapods as well, but I have a problem: I must specify the version 1.0.4 of your library in the podspec of my project, but the only version of RMJSONPatch available on Cocoapods is the 1.0.0.
Please can you update Cocoapods with the last version available on Github?
I am the maintainer of a library that depends on JSONPatch. I appreciate your work on this library and I use it in my project. However, I encountered a problem when I tried to make a new release on Cocoapods. The problem is that since Xcode 14.3, the minimum deployment target for iOS has been increased to 11.0 (the current one for your library is 8.0) and for macOS to 10.12 (the current one is 10.10). The issue is discussed here and here.
Could you please update the files RMJSONPatch.podspec and Package.swift and make a new release of the library to comply with the latest versions of Xcode?
Also, could you please add the deployment targets for watchOS and tvOS in the podspec and package files? Currently, they are not specified and this may cause compatibility issues for some users.
I tested on the following targets and everything works as expected:
s.ios.deployment_target = "11.0"
s.osx.deployment_target = "10.12"
s.watchos.deployment_target = "3.0"
s.tvos.deployment_target = "10.0"
s.swift_versions = ['5']
Thank you for your time and attention.
The Package.swift file should indicate the languages of Swift that is supports Apple Doc
It appears that your package supports Swift 4, 5 so you should update the Package.swift with this line
swiftLanguageVersions: [4, 5]
This should silence the warning
'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'JSONPointer' to 'Hashable' by implementing 'hash(into:)' instead
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.