ibireme / yyjson

The fastest JSON library in C
https://ibireme.github.io/yyjson/doc/doxygen/html/
MIT License
3.04k stars 262 forks source link

Convert yyjson_get_TYPE_pointer() routines to accept `yyjson_val` #117

Closed chad-earthscope closed 1 year ago

chad-earthscope commented 1 year ago

In #116 the functions do not follow the API naming conventions. Specifically, they accepted yyjson_doc but did not include doc in their name.

On further consideration, these functions would be more flexible if they accepted yyjson_val instead of yyjson_doc as one can always use yyjson_doc_get_root() and therefore support more use cases.

This PR changes the functions to accept yyjson_val instead of yyjson_doc.

codecov[bot] commented 1 year ago

Codecov Report

Merging #117 (0a8d863) into develop (eff9b8c) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #117   +/-   ##
========================================
  Coverage    98.50%   98.50%           
========================================
  Files            2        2           
  Lines         2480     2480           
========================================
  Hits          2443     2443           
  Misses          37       37           
Impacted Files Coverage Δ
src/yyjson.h 87.05% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.