Ilya Maximets
0b21e23431
json: Fix deep copy of objects and arrays.
...
When reference counting for json objects was introduced the
old json_clone() function became json_deep_clone(), but it
still calls shallow json_clone() while cloning objects and
arrays not really producing a deep copy.
Fixing that by making other functions to perform a deep copy
as well. There are no users for this functionality inside
OVS right now, but OVS exports this functionality externally.
'ovstest test-json' extended to test both versions of a clone
on provided inputs.
Fixes: 9854d473adea ("json: Use reference counting in JSON objects")
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2022-10-11 21:10:46 +02:00
..
2022-05-04 18:39:24 +02:00
2022-01-10 23:31:29 +01:00
2022-09-27 01:17:56 +02:00
2022-05-30 23:28:22 +02:00
2018-08-15 11:36:18 -07:00
2022-07-15 20:14:24 +02:00
2016-06-10 08:39:42 -07:00
2022-09-27 01:17:56 +02:00
2020-07-27 14:50:17 -07:00
2020-08-17 21:38:47 +02:00
2020-10-21 11:28:24 -07:00
2018-06-11 15:32:00 -07:00
2019-09-27 09:23:50 -07:00
2022-09-15 14:18:25 +02:00
2022-06-07 15:17:52 +02:00
2022-07-12 15:45:42 +02:00
2019-09-27 09:23:50 -07:00
2022-05-17 23:10:41 +02:00
2021-01-05 18:55:45 +01:00
2022-07-19 19:55:19 +02:00
2022-06-24 20:29:44 +02:00
2021-12-03 23:20:15 +01:00
2022-05-04 18:39:24 +02:00
2018-09-10 12:33:57 -07:00
2018-02-01 11:27:08 -08:00
2021-08-28 02:59:04 +02:00
2021-08-28 02:59:04 +02:00
2019-09-27 09:23:50 -07:00
2019-09-27 09:23:50 -07:00
2016-10-12 12:22:11 -07:00
2020-10-21 11:28:24 -07:00
2018-02-13 10:43:13 -08:00
2022-09-27 01:17:56 +02:00
2022-05-26 11:43:48 +02:00
2022-06-30 17:56:57 +01:00
2022-01-17 02:04:20 +01:00
2019-06-09 16:19:33 -07:00
2018-06-11 15:31:59 -07:00
2022-07-19 19:55:19 +02:00
2022-07-15 11:39:20 +01:00
2022-01-17 02:04:20 +01:00
2019-02-05 09:21:19 -08:00
2022-07-19 19:55:19 +02:00
2017-10-06 20:52:24 -07:00
2022-09-16 13:58:42 +02:00
2022-07-15 11:38:16 +01:00
2022-07-19 19:55:19 +02:00
2022-09-14 13:24:27 +02:00
2022-09-14 13:24:27 +02:00
2018-06-11 15:32:00 -07:00
2021-07-01 20:44:25 +02:00
2022-03-11 21:14:51 +01:00
2022-05-17 23:50:42 +02:00
2019-04-22 13:02:58 -07:00
2022-06-30 11:10:31 +02:00
2018-10-03 18:13:48 -07:00
2021-09-24 15:01:38 +02:00
2020-01-16 16:02:05 -08:00
2022-09-27 00:44:35 +02:00
2018-11-19 08:47:53 -08:00
2018-06-11 15:32:00 -07:00
2019-10-16 12:11:32 +02:00
2020-08-26 13:05:01 +02:00
2019-09-27 09:23:50 -07:00
2018-06-11 15:32:00 -07:00
2018-06-11 15:32:00 -07:00
2018-08-10 11:16:52 -07:00
2019-10-24 14:25:40 -07:00
2018-06-11 15:32:00 -07:00
2018-06-11 15:32:00 -07:00
2022-05-17 23:50:42 +02:00
2021-01-15 19:23:02 +01:00
2017-12-08 14:13:49 -08:00
2019-04-15 12:54:38 -07:00
2016-10-04 13:28:08 -07:00
2022-06-29 23:27:32 +02:00
2022-07-19 19:55:19 +02:00
2022-07-15 20:14:24 +02:00
2022-02-24 17:04:32 +01:00
2017-01-12 08:58:20 -08:00
2018-06-11 15:32:00 -07:00
2018-06-11 15:32:00 -07:00
2020-08-26 13:05:01 +02:00
2018-06-14 16:56:27 -07:00
2019-11-20 16:48:26 +01:00
2019-12-18 02:02:52 +01:00
2020-04-28 17:58:31 +02:00
2022-03-04 19:51:35 +01:00
2022-09-14 13:24:27 +02:00
2018-04-21 18:29:57 +01:00
2022-09-27 00:21:33 +02:00
2018-07-10 14:10:25 -07:00
2022-09-09 19:08:12 +02:00
2022-08-08 12:36:45 +02:00
2021-04-01 19:13:31 +02:00
2022-09-09 16:54:58 +02:00
2017-06-15 11:55:38 +02:00
2022-09-14 13:24:27 +02:00
2022-03-22 22:09:34 +01:00
2020-05-14 07:22:35 -07:00
2022-09-14 13:24:27 +02:00
2022-07-13 17:39:22 +02:00
2020-05-14 07:22:35 -07:00
2022-08-08 12:36:45 +02:00
2020-10-08 15:55:57 +02:00
2020-07-21 06:23:49 -07:00
2018-07-09 20:53:06 -07:00
2014-10-30 09:14:46 -07:00
2017-10-06 09:46:43 -07:00
2022-01-18 15:12:01 +01:00
2016-08-15 17:26:15 -07:00
2020-10-21 11:28:24 -07:00
2014-10-30 09:14:46 -07:00
2017-08-02 15:03:35 -07:00
2020-10-16 19:22:24 -07:00
2022-03-30 16:59:02 +02:00
2020-08-26 11:58:13 +02:00
2017-12-22 12:58:02 -08:00
2017-01-03 12:49:50 -08:00
2018-10-05 17:35:07 -07:00
2022-05-17 23:06:46 +02:00
2016-08-15 17:26:15 -07:00
2022-03-30 16:59:03 +02:00
2022-03-30 16:59:02 +02:00
2022-01-18 19:30:17 +01:00
2022-10-11 21:10:46 +02:00
2019-12-20 12:23:06 -08:00
2019-01-10 15:39:48 -08:00
2021-06-22 21:29:57 +02:00
2020-08-26 13:05:01 +02:00
2018-06-11 15:32:00 -07:00
2022-09-16 12:53:41 +02:00
2014-12-15 14:15:19 +01:00
2022-01-18 19:30:17 +01:00
2016-04-14 16:38:24 -07:00
2017-11-03 10:47:55 -07:00
2017-11-03 10:47:55 -07:00
2022-01-04 19:14:11 +01:00
2019-11-21 17:15:47 -08:00
2016-03-30 13:10:18 -07:00
2022-09-27 00:44:35 +02:00
2022-08-04 18:13:20 +02:00
2017-06-01 16:20:37 -07:00
2014-10-30 09:14:46 -07:00
2022-05-30 23:34:39 +02:00
2021-01-07 10:58:53 -08:00
2021-06-22 21:29:57 +02:00
2018-02-09 22:56:58 -08:00
2018-06-11 15:32:00 -07:00
2022-05-26 11:43:53 +02:00
2017-08-03 14:48:33 -07:00
2018-04-03 14:02:43 -07:00
2018-02-09 22:56:58 -08:00
2020-12-21 20:25:59 +01:00
2019-01-10 15:39:48 -08:00
2016-04-14 13:48:05 -07:00
2014-10-30 09:14:46 -07:00
2016-08-03 08:23:39 -07:00
2017-11-03 10:47:55 -07:00
2018-08-15 11:04:39 -07:00
2022-05-17 23:06:46 +02:00
2016-04-14 13:40:32 -07:00
2022-09-27 01:17:56 +02:00
2022-10-06 22:01:09 +02:00
2019-12-20 12:23:06 -08:00
2022-08-15 13:07:13 +02:00
2022-07-19 19:55:19 +02:00
2022-09-14 13:24:27 +02:00
2022-08-15 13:07:13 +02:00
2019-09-27 09:23:50 -07:00
2020-08-26 13:05:01 +02:00
2019-09-27 09:23:50 -07:00
2020-01-07 12:13:38 -08:00