~ K A L I ~
UNAME : Linux web62.extendcp.co.uk 4.18.0-553.58.1.el8_10.x86_64 #1 SMP Wed Jun 25 06:37:46 EDT 2025 x86_64SERVER IP : 10.0.187.62 -________-
CLIENT IP : 216.73.216.199 MINI SHELL D ZAB '
Current File : //usr/share/gems/gems/multi_json-1.13.1/lib/multi_json/adapters/nsjsonserialization.rb |
framework 'Foundation'
require 'multi_json/adapters/ok_json'
module MultiJson
module Adapters
class Nsjsonserialization < MultiJson::Adapters::OkJson
ParseError = ::MultiJson::OkJson::Error
def load(string, options = {})
data = string.dataUsingEncoding(NSUTF8StringEncoding)
object = NSJSONSerialization.JSONObjectWithData(data, :options => NSJSONReadingMutableContainers | NSJSONReadingMutableLeaves, :error => nil)
if object
object = symbolize_keys(object) if options[:symbolize_keys]
object
else
super(string, options)
end
end
def dump(object, options = {})
pretty = options[:pretty] ? NSJSONWritingPrettyPrinted : 0
object = object.as_json if object.respond_to?(:as_json)
if NSJSONSerialization.isValidJSONObject(object)
data = NSJSONSerialization.dataWithJSONObject(object, :options => pretty, :error => nil)
NSMutableString.alloc.initWithData(data, :encoding => NSUTF8StringEncoding)
else
super(object, options)
end
end
end
end
end
Coded by KALI :v Greetz to DR HARD ../ kali.zbi@hotmail.com