Commit graph

8 commits

Author SHA1 Message Date
Julian Bouzas
a68a7cec0e spa-json: allow parsing unquoted keys when getting object properties
Unquoted strings are used in wireplumber and pipewire configuration files.
2022-03-24 07:21:25 +00:00
George Kiagiadakis
8d4fe81ebd spa-json: allocate enough space for parsing strings without looping
The string size is always less or equal to the size of the token (len),
so by allocating len+1 bytes we have enough space to write the whole
token and the null byte, if needed.
2022-03-16 21:11:09 +02:00
Ashok Sidipotu
2248b8ec1f spa-json: Parse unquoted string literals
- pipewire supports parsing unquoted strings and they are used
  extensively in JSON .conf files.
- Extend this support into wireplumber, as it wants to use the pipewire
  like syntax in its JSON .conf files.
2022-03-16 20:51:49 +02:00
Julian Bouzas
2a6902a634 spa-json: fix format and remove unneded WP_API 2022-02-15 16:19:47 -05:00
Julian Bouzas
e429db7e8c spa-json: fix va_list APIs for different architectures
The va_list type might not always be a pointer in some architectures, so we
cannot guarantee it will be modified after using it for a second time in another
function. This fixes the issue by using macros so args does not get copied, and
always gets modified when using it more than once.
2022-02-09 07:59:59 -05:00
Julian Bouzas
585ad72c7c spa-json: add null character when finishing building json 2022-02-01 16:07:12 +00:00
Julian Bouzas
46ab414a04 spa-json: fix coverity scan issues 2022-01-25 21:18:16 -05:00
Julian Bouzas
4c1574117a spa-json: add new WpSpaJson API 2022-01-25 07:20:35 -05:00