mirror of
https://github.com/kgabis/parson.git
synced 2024-11-24 06:05:29 +00:00
Improved serialization performance (#156)
* Update parson.c Get objects by index instead of key in json_serialize_to_buffer_r(). * Increments version and updates licence date. Co-authored-by: Krzysztof Gabis <kgabis@gmail.com>
This commit is contained in:
parent
8beeb5ea4d
commit
60b2c69f17
@ -3,7 +3,7 @@ project(parson C)
|
||||
|
||||
include (GNUInstallDirs)
|
||||
|
||||
set(PARSON_VERSION 1.1.0)
|
||||
set(PARSON_VERSION 1.1.1)
|
||||
add_library(parson parson.c)
|
||||
target_include_directories(parson PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
|
||||
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2012 - 2020 Krzysztof Gabis
|
||||
Copyright (c) 2012 - 2021 Krzysztof Gabis
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "parson",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"repo": "kgabis/parson",
|
||||
"description": "Small json parser and reader",
|
||||
"keywords": [ "json", "parser" ],
|
||||
|
6
parson.c
6
parson.c
@ -1,8 +1,8 @@
|
||||
/*
|
||||
SPDX-License-Identifier: MIT
|
||||
|
||||
Parson 1.1.0 ( http://kgabis.github.com/parson/ )
|
||||
Copyright (c) 2012 - 2020 Krzysztof Gabis
|
||||
Parson 1.1.1 ( http://kgabis.github.com/parson/ )
|
||||
Copyright (c) 2012 - 2021 Krzysztof Gabis
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@ -960,7 +960,7 @@ static int json_serialize_to_buffer_r(const JSON_Value *value, char *buf, int le
|
||||
if (is_pretty) {
|
||||
APPEND_STRING(" ");
|
||||
}
|
||||
temp_value = json_object_get_value(object, key);
|
||||
temp_value = json_object_get_value_at(object, i);
|
||||
written = json_serialize_to_buffer_r(temp_value, buf, level+1, is_pretty, num_buf);
|
||||
if (written < 0) {
|
||||
return -1;
|
||||
|
4
parson.h
4
parson.h
@ -1,8 +1,8 @@
|
||||
/*
|
||||
SPDX-License-Identifier: MIT
|
||||
|
||||
Parson 1.1.0 ( http://kgabis.github.com/parson/ )
|
||||
Copyright (c) 2012 - 2020 Krzysztof Gabis
|
||||
Parson 1.1.1 ( http://kgabis.github.com/parson/ )
|
||||
Copyright (c) 2012 - 2021 Krzysztof Gabis
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
2
tests.c
2
tests.c
@ -2,7 +2,7 @@
|
||||
SPDX-License-Identifier: MIT
|
||||
|
||||
Parson ( http://kgabis.github.com/parson/ )
|
||||
Copyright (c) 2012 - 2020 Krzysztof Gabis
|
||||
Copyright (c) 2012 - 2021 Krzysztof Gabis
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
Loading…
Reference in New Issue
Block a user