mirror of
https://github.com/json-c/json-c.git
synced 2026-03-13 18:19:06 +08:00
Initially I wanted to also do a function that generates the JSON patch from two JSON documents, but even just applying the JSON patch was a bit of work, especially when needing to satisfy all the test-cases. This change defines all the operation in the RFC6902. The addition isn't too big (for the json_patch_apply() function), as part of the heavy lifting is also done by JSON pointer logic. All the ops were tested with the test-cases defined at: https://github.com/json-patch/json-patch-tests RFC6902: https://tools.ietf.org/html/rfc6902 Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
40 lines
826 B
Plaintext
40 lines
826 B
Plaintext
/*
|
|
* $Id: json.h,v 1.6 2006/01/26 02:16:28 mclark Exp $
|
|
*
|
|
* Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
|
|
* Michael Clark <michael@metaparadigm.com>
|
|
* Copyright (c) 2009 Hewlett-Packard Development Company, L.P.
|
|
*
|
|
* This library is free software; you can redistribute it and/or modify
|
|
* it under the terms of the MIT license. See COPYING for details.
|
|
*
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief A convenience header that may be included instead of other individual ones.
|
|
*/
|
|
#ifndef _json_h_
|
|
#define _json_h_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "arraylist.h"
|
|
#include "debug.h"
|
|
#include "json_c_version.h"
|
|
#include "json_object.h"
|
|
#include "json_object_iterator.h"
|
|
@JSON_H_JSON_PATCH@
|
|
@JSON_H_JSON_POINTER@
|
|
#include "json_tokener.h"
|
|
#include "json_util.h"
|
|
#include "linkhash.h"
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|