X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fjson.h;h=ef2312449b55c49a4ff4b42221f352c10c38a5f7;hb=7685b7a9e5b3f6db6832e52e111000ff36d3acb4;hp=41257b0d7e610fe3da88e042f917aa7e266557c4;hpb=02dd3123a0e312f1d33403e744af52dd6096f12d;p=sliver-openvswitch.git diff --git a/lib/json.h b/lib/json.h index 41257b0d7..ef2312449 100644 --- a/lib/json.h +++ b/lib/json.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010 Nicira Networks. + * Copyright (c) 2009, 2010, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,10 @@ #include "shash.h" +#ifdef __cplusplus +extern "C" { +#endif + struct ds; /* Type of a JSON value. */ @@ -123,9 +127,15 @@ enum { }; char *json_to_string(const struct json *, int flags); void json_to_ds(const struct json *, int flags, struct ds *); + +size_t json_serialized_length(const struct json *); /* JSON string formatting operations. */ bool json_string_unescape(const char *in, size_t in_len, char **outp); +#ifdef __cplusplus +} +#endif + #endif /* json.h */