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

conversion from/to C array is not supported #502

Closed
theodelrieu opened this issue Mar 13, 2017 · 6 comments · Fixed by #508
Closed

conversion from/to C array is not supported #502

theodelrieu opened this issue Mar 13, 2017 · 6 comments · Fixed by #508

Comments

@theodelrieu
Copy link
Contributor

theodelrieu commented Mar 13, 2017

I just realized I forgot to add the overloads for C arrays.

I don't remember if they were there before (I'm quite sure there was no tests, I would have seen it).

I think we should add this missing feature

@nlohmann
Copy link
Owner

Yes, I think we just forgot them.

@theodelrieu
Copy link
Contributor Author

Do we want to have a special behaviour for char arrays?

I would treat all arrays as vectors personally.

@nlohmann
Copy link
Owner

A conversion from char x[] to json already works as is. Or what do you mean?

@theodelrieu
Copy link
Contributor Author

I mean, do we consider char[] as a string or as an array?

From what I understand, this case is already treated as a string, but the other C arrays should be converted to json arrays. Is that correct?

@gregmarr
Copy link
Contributor

Sounds reasonable to me.

@nlohmann
Copy link
Owner

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants