summaryrefslogtreecommitdiff
path: root/lib/json.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "json: New function json_serialized_length()."Ben Pfaff2014-04-031-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1600fa6853872e16130366351a2c14f6fa8b547c. Connections that queue up too much data, because they are monitoring a table that is changing quickly and failing to keep up with the updates, cause problems with buffer management. Since commit 60533a405b2e (jsonrpc-server: Disconnect connections that queue too much data.), ovsdb-server has dealt with them by disconnecting the connection and letting them start up again with a fresh copy of the database. However, this is not ideal because of situations where disconnection happens repeatedly. For example: - A manager toggles a column back and forth between two or more values quickly (in which case the data transmitted over the monitoring connections always increases quickly, without bound). - A manager repeatedly extends the contents of some column in some row (in which case the data transmitted over the monitoring connection grows with O(n**2) in the length of the string). A better way to deal with this problem is to combine updates when they are sent to the monitoring connection, if that connection is not keeping up. In both the above cases, this reduces the data that must be sent to a manageable amount. An upcoming patch implements this new way. This commit reverts part of the previous solution that disconnects backlogged connections, since it is no longer useful. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* json: New function json_serialized_length().Ben Pfaff2013-04-011-1/+3
| | | | | | This will be used for the first time in an upcoming commit. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Global replace of Nicira Networks.Raju Subramanian2012-05-021-1/+1
| | | | | | | | Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc. Feature #10593 Signed-off-by: Raju Subramanian <rsubramanian@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* json: Add extern "C" { ... } to headers.Ben Pfaff2010-08-061-0/+8
| | | | | | This makes it easier for external C++ projects to import the header. CC: Jeremy Stribling <strib@nicira.com>
* json: New function json_to_ds().Ben Pfaff2010-01-261-1/+4
| | | | | | | | | | | Some upcoming code wants to serialize JSON into a "struct ds" dynamic string buffer, so expose an interface to do this. This commit doesn't change much, but it renames some functions internal to json.c to make the naming more consistent. Also, make jsonrpc_log_msg() use this new function, since it is a more straightforward way to do what it wants.
* json: Export function to parse an individual JSON string.Ben Pfaff2010-01-261-0/+4
| | | | | | | | | The JSON syntax for strings is very reasonable. An upcoming commit will have a need for a string parser, so make the JSON string parser available for that. Also, this change improves the error message for strings that end in the middle of a \u sequence, so update the tests to match.
* test-json: Avoid use of /dev/stdin to fix builds in limited chroots.Ben Pfaff2009-12-171-0/+1
| | | | | | The chroots in which we often build Open vSwitch don't have /proc and thus cannot support /dev/stdin, because on Linux that is a symlink to /proc/self/fd/0. So avoid using /dev/stdin in the testsuite.
* json: New convenience function json_array_create_1().Ben Pfaff2009-12-071-0/+1
|
* Implement JSON parsing and serialization.Ben Pfaff2009-11-041-0/+122
This will be used by the upcoming Open vSwitch configuration database.