summaryrefslogtreecommitdiffstats
path: root/macosx/NSJSONSerialization+HBAdditions.h
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-05-30 07:45:00 +0000
committerritsuka <[email protected]>2015-05-30 07:45:00 +0000
commit39eff9d080effd0138c91f397632d24b38f7a441 (patch)
tree04e529f8b72ad44a628c6717a3b80afcc3950bb2 /macosx/NSJSONSerialization+HBAdditions.h
parent2837048a59ac5beab0b3428ca89c86857765de0a (diff)
MacGui: fix the leaks after using hb_presets_import_json and hb_presets_clean_json, add an extension to NSJSONSerialization to convert a char * directly.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7245 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/NSJSONSerialization+HBAdditions.h')
-rw-r--r--macosx/NSJSONSerialization+HBAdditions.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/macosx/NSJSONSerialization+HBAdditions.h b/macosx/NSJSONSerialization+HBAdditions.h
new file mode 100644
index 000000000..58bb47d98
--- /dev/null
+++ b/macosx/NSJSONSerialization+HBAdditions.h
@@ -0,0 +1,18 @@
+/* NSJSONSerialization+HBAdditions.h $
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr/>.
+ It may be used under the terms of the GNU General Public License. */
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NSJSONSerialization (HBAdditions)
+
++ (nullable id)HB_JSONObjectWithUTF8String:(const char *)nullTerminatedCString options:(NSJSONReadingOptions)opt error:(NSError **)error;
++ (nullable NSString *)HB_StringWithJSONObject:(id)obj options:(NSJSONWritingOptions)opt error:(NSError **)error;
+
+@end
+
+NS_ASSUME_NONNULL_END