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

parson conflicts with json-c library #215

Open
bog-dan-ro opened this issue Sep 13, 2022 · 3 comments
Open

parson conflicts with json-c library #215

bog-dan-ro opened this issue Sep 13, 2022 · 3 comments

Comments

@bog-dan-ro
Copy link

I'm trying to use tinyspline with other libs which depend on json-c library, but I fail to link them because parson & json-c are using the same functions names.
Is it possible to make JSON suport optional or rename parson's function or somehow hide them ?

@msteinbeck
Copy link
Owner

Could you please name the affected functions? The easiest solution is to rename them (for example by adding the prefix ts_). In the long run, I would like to replace parson with a custom implementation anyways.

@bog-dan-ro
Copy link
Author

I think all json_* functions used by ts are clashing with json-c library.
IMHO a new compilation flag is better as most of the people that are using TS in combination with JSON will use their own library. Adding JSON parser/writer inside TS will duplicate the code size for JSON ...

@msteinbeck
Copy link
Owner

as most of the people that are using TS in combination with JSON will use their own library.

The same could be true with, for example, TinySpline's vector functions. Yet, I would like to avoid adding various compilation flags to enable or disable certain features. As I said, in the long run I would like to implement JSON serialization directly in TinySpline.

Adding JSON parser/writer inside TS will duplicate the code size for JSON

TinySpline's JSON parser would only need a very small subset of general JSON parser libraries. For example, only numbers and array of numbers are needed. Generating JSON should be really easy. Parsing JSON requires some error handling. However, the amount of code should be quite small.

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 a pull request may close this issue.

2 participants