jansson.h: Fix typo
[jansson.git] / src / jansson.h
index 33b2f94..02b20f5 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2009 Petri Lehtinen <petri@digip.org>
+ *
+ * Jansson is free software; you can redistribute it and/or modify
+ * it under the terms of the MIT license. See LICENSE for details.
+ */
+
 #ifndef JANSSON_H
 #define JANSSON_H
 
@@ -31,6 +38,7 @@ typedef struct {
 #define json_is_number(json)   (json_is_integer(json) || json_is_real(json))
 #define json_is_true(json)     (json && json_typeof(json) == JSON_TRUE)
 #define json_is_false(json)    (json && json_typeof(json) == JSON_FALSE)
+#define json_is_boolean(json)  (json_is_true(json) || json_is_false(json))
 #define json_is_null(json)     (json && json_typeof(json) == JSON_NULL)
 
 /* construction, destruction, reference counting */
@@ -44,8 +52,6 @@ json_t *json_true(void);
 json_t *json_false(void);
 json_t *json_null(void);
 
-json_t *json_clone(json_t *json);
-
 static inline json_t *json_incref(json_t *json)
 {
     if(json)
@@ -93,15 +99,14 @@ typedef struct {
     int line;
 } json_error_t;
 
-json_t *json_load(const char *path, json_error_t *error);
 json_t *json_loads(const char *input, json_error_t *error);
 json_t *json_loadf(FILE *input, json_error_t *error);
+json_t *json_load_file(const char *path, json_error_t *error);
 
 #define JSON_INDENT(n)   (n & 0xFF)
-#define JSON_SORT_KEYS   0x100
 
-int json_dump(const json_t *json, const char *path, uint32_t flags);
 char *json_dumps(const json_t *json, uint32_t flags);
 int json_dumpf(const json_t *json, FILE *output, uint32_t flags);
+int json_dump_file(const json_t *json, const char *path, uint32_t flags);
 
 #endif