Skip to content

Commit

Permalink
decode: remove dead code from ns_keyed_archiver
Browse files Browse the repository at this point in the history
  • Loading branch information
dgmcdona committed Dec 17, 2022
1 parent 3ec0ba3 commit 7083467
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions format/apple/bplist/ns_keyed_archiver.jq
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 7083467

Please sign in to comment.