Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json object split #632

Merged
merged 19 commits into from
Jun 20, 2020
Merged

Json object split #632

merged 19 commits into from
Jun 20, 2020

Conversation

hawicz
Copy link
Member

@hawicz hawicz commented Jun 7, 2020

https://github.com/json-c/json-c/wiki/Proposal:-struct-json_object-split

An internal-only change (no public API differences) to split struct json_object into a base type (still called struct json_object) and several sub-types:

  • struct json_object_object
  • struct json_object_array
  • struct json_object_boolean
  • struct json_object_double
  • struct json_object_int
  • struct json_object_string

Changes are largely confined to json_object.c and json_object_private.h
As mentioned in the ChangeLog, this improves memory usage and processing speed.

hawicz added 15 commits May 25, 2020 03:18
…ed at https://github.com/json-c/json-c/wiki/Proposal:-struct-json_object-split

The current changes split out _only_ json_type_object, and thus have a number of hacks
 to allow the code to continue to build and work.

Originally  mentioned in issue #535.
When complete, this will probably invalidate #552.
This is likely to cause notable conflicts in any other significant un-merged
changes, such as PR#620.
Clean up the code in json_object_new_* a bit by dropping unnecesary json_object_base variables.
The default is now that string data is stored inline at the end of json_object, though to allow for json_object_set_string() to set a _longer_ string, we still need to allow for the possibility of a separate char * pointer.
All json types have been split out now, next step it cleanup.
…ctionally complete.

Remove all of the temporary defines, structures, old compat fuctions, extra fields, etc... that were needed during the conversion to a split set of json_object_* structures.
…h so as not to affect publically exposed symbols.
@hawicz hawicz requested a review from dota17 June 7, 2020 18:55
@coveralls
Copy link

coveralls commented Jun 7, 2020

Coverage Status

Coverage increased (+0.4%) to 87.332% when pulling 0710c83 on json_object-split into bc06f82 on master.

@dota17
Copy link
Member

dota17 commented Jun 13, 2020

Sorry for the delay in the review.

json_object.c Outdated Show resolved Hide resolved
json_object.c Outdated Show resolved Hide resolved
json_object.c Show resolved Hide resolved
json_object_private.h Outdated Show resolved Hide resolved
json_object.c Outdated Show resolved Hide resolved
@hawicz hawicz merged commit 99bb212 into master Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants