diff options
author | Nikias Bassen | 2021-12-23 03:09:07 +0100 |
---|---|---|
committer | Nikias Bassen | 2021-12-23 03:09:07 +0100 |
commit | 429cbc660ae14d4998715803b44c71abf0e4a339 (patch) | |
tree | 12fe08f5dcb00a380536198bac3fffd4eb7dd19b /test/plist_cmp.c | |
parent | 70002721443dabaa99b56301b537980e137b6249 (diff) | |
download | libplist-429cbc660ae14d4998715803b44c71abf0e4a339.tar.gz libplist-429cbc660ae14d4998715803b44c71abf0e4a339.tar.bz2 |
Add support for JSON format
Diffstat (limited to 'test/plist_cmp.c')
-rw-r--r-- | test/plist_cmp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/plist_cmp.c b/test/plist_cmp.c index c854446..85b92ee 100644 --- a/test/plist_cmp.c +++ b/test/plist_cmp.c @@ -126,11 +126,15 @@ int main(int argc, char *argv[]) if (memcmp(plist_1, "bplist00", 8) == 0) plist_from_bin(plist_1, size_in1, &root_node1); + else if (plist_1[0] == '[' || plist_1[0] == '{') + plist_from_json(plist_1, size_in1, &root_node1); else plist_from_xml(plist_1, size_in1, &root_node1); if (memcmp(plist_2, "bplist00", 8) == 0) plist_from_bin(plist_2, size_in2, &root_node2); + else if (plist_2[0] == '[' || plist_2[0] == '{') + plist_from_json(plist_2, size_in2, &root_node2); else plist_from_xml(plist_2, size_in2, &root_node2); |