diff --git a/format/apple/bplist/ns_keyed_archiver.jq b/format/apple/bplist/ns_keyed_archiver.jq index c39c161b..91a17aa9 100644 --- a/format/apple/bplist/ns_keyed_archiver.jq +++ b/format/apple/bplist/ns_keyed_archiver.jq @@ -1,47 +1,3 @@ -def from_ns_keyed_archiver_root: - ( . as {"$objects": $objs, "$top": {root: $root_uid, "$0": $zero}} - | def _f($id): - ( . - | $objs[$id] - | if type == "string" then . - elif type == "number" then . - elif type == "boolean" then . - elif type == "null" then . - elif type == "array" then . - else - (. as {"$class": $class} - | if $class == null then . else - $objs[$class]."$classname" as $cname - | if $cname == "NSDictionary" or $cname == "NSMutableDictionary" then - ( . as {"NS.keys": $ns_keys, "NS.objects": $ns_objects} - | [$ns_keys, $ns_objects] - | transpose - | map - ( - ( . as [$k, $o] - | {key: _f($k), value: _f($o)} - ) - ) - | from_entries - ) - elif ["NSArray", "NSMutableArray", "NSSet", "NSMutableSet"] - | any(. == $cname) then - ( . as {"NS.objects": $ns_objects} - | $ns_objects - | map(_f(.)) - ) - elif $cname == "NSData" or $cname == "NSMutableData" then ."NS.Data" - elif $cname == "NSUUID" then ."NS.uuidbytes" - else ."class"=$cname - end - end - ) - end - ); - _f($root_uid? // $zero) - ); - - def from_ns_keyed_archiver: ( . as { "$objects": $objects,