X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fjson.h;h=41257b0d7e610fe3da88e042f917aa7e266557c4;hb=f4b6076acab233cfe02e7eaefdeafbb69dfae556;hp=144855c8d11f5d4b72dd1ea1a0732af59e218a78;hpb=5562d6f55e762ea6783a9f6032e85ccb2824773f;p=openvswitch diff --git a/lib/json.h b/lib/json.h index 144855c8..41257b0d 100644 --- a/lib/json.h +++ b/lib/json.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nicira Networks. + * Copyright (c) 2009, 2010 Nicira Networks. * * 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,8 @@ #include "shash.h" +struct ds; + /* Type of a JSON value. */ enum json_type { JSON_NULL, /* null */ @@ -120,5 +122,10 @@ enum { JSSF_SORT = 1 << 1 /* Object members in sorted order, if true. */ }; char *json_to_string(const struct json *, int flags); +void json_to_ds(const struct json *, int flags, struct ds *); + +/* JSON string formatting operations. */ + +bool json_string_unescape(const char *in, size_t in_len, char **outp); #endif /* json.h */