json-utils.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* json-utils.h - JSON utility API
  2. *
  3. * This file is part of JSON-GLib
  4. * Copyright 2015 Emmanuele Bassi
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef __JSON_UTILS_H__
  20. #define __JSON_UTILS_H__
  21. #if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
  22. #error "Only <json-glib/json-glib.h> can be included directly."
  23. #endif
  24. #include <json-glib/json-types.h>
  25. G_BEGIN_DECLS
  26. JSON_AVAILABLE_IN_1_2
  27. JsonNode * json_from_string (const char *str,
  28. GError **error);
  29. JSON_AVAILABLE_IN_1_2
  30. char * json_to_string (JsonNode *node,
  31. gboolean pretty);
  32. G_END_DECLS
  33. #endif /* __JSON_UTILS_H__ */