JSON Serialisation
Json parsing is already implemented I assume, I think Json serialisation would be a great addition. Like with swift.
Defining a struct like
struct Person {
let name: String
let age: Int
}
JSONSerialization can directly create an Item object from
{
"name": "Burak",
"age": 24
}
I am not sure how this can be developed but, I can start something if this is inline with the project.
It's quite straightforward with C3 actually. I just haven't bothered writing it as I don't think it's super useful.
Yeah, I think the feature looked cool to me probably because swift has a weird object system 😅
@lerno : Is C3 going to support more than the standard c library? I think betterC is fine with it. Extras can live in another repo.
This one can be ported for example or just used
https://github.com/barrust/c-utils
@fithisux there is a standard library in C3, so I don't understand the question.
The idea is not to overload it with many things. Also I was under the impression that it uses only stdc like betterC.
I will delve deeper.
No, C3 has a cross platform standard library.
A standardised way of serialising JSON would be very helpful, I think it would be a big improvement on having many different ad-hoc solutions for it.
There is currently a JSON encoder in the std lib. In theory you would just need to make the inverse of this. Unless I missed something here?