Earlier quoted context omitted.
JSON does not necessarily come from untrusted sources if you control the entire system. Not everything needs to be absolutely 100% secure so long as you control the system. If you are opening the system to the public, then sure, you should strive for security, but that isn't always necessary in projects that are not processing public input. Here's an example - I once coded a limited JSON parser in assembly language.…
Untrusted doesn’t always mean adversarial IMO, even a bitrot can invalidate your entire input and possibly also trigger undefined behaviour if you aren’t prepared to handle that.
Sj.h: A tiny little JSON parsing library in ~150 lines of C99
101–110 of 248 posts
Re: Sj.h: A tiny little JSON parsing library in ~150 lines of C99
#102Earlier quoted context omitted.
Strongly disagree here because JSON can come from untrusted sources and this has security implications. It's not the same kind of problem that the bloat article discusses where you just have bad contracts on interfaces.
Public facing interfaces are their own special thing, regardless if json or anything else, and not all data is a public facing interface. If you need it, then you need it. But if you don't need it, then you don't need it. There is a non-trivial value in the smallness and simplicity, and a non-trivial cost in trying to handle infinity problems when you don't have infinity use-case.
Re: Sj.h: A tiny little JSON parsing library in ~150 lines of C99
#103Earlier quoted context omitted.
It's open source, not free software.
The license says otherwise; hard to get freer than public domain.
Edit: I was not aware of the FSF's definition. I was using a definition of free software being software that you can use without having to pay for it.
Re: Sj.h: A tiny little JSON parsing library in ~150 lines of C99
#104Earlier quoted context omitted.
JSON does not necessarily come from untrusted sources if you control the entire system. Not everything needs to be absolutely 100% secure so long as you control the system. If you are opening the system to the public, then sure, you should strive for security, but that isn't always necessary in projects that are not processing public input. Here's an example - I once coded a limited JSON parser in assembly language.…
You probably didn't control the other end, as otherwise you would've used something more sane than JSON?
Re: Sj.h: A tiny little JSON parsing library in ~150 lines of C99
#105Earlier quoted context omitted.
It's open source, not free software.
The license says otherwise; hard to get freer than public domain.
Re: Sj.h: A tiny little JSON parsing library in ~150 lines of C99
#106What I love about this author's work is that they're usually single-file libraries in ANSI C or Lua with focused scope, easy-to-use interface, and good documentation. And free software license. Aside from the posted project, some I like are: - log.c - A simple logging library implemented in C99 - microui - A tiny immediate-mode UI library - fe - A tiny, embeddable language implemented in ANSI C - microtar - A lightwe…
It's open source, not free software.
The MIT license upholds the four essential freedoms of free software: the right to run, copy, distribute, study, change and improve the software.
It is listed under "Expat License" in the list of GPL-compatible Free Software licenses.
Re: Sj.h: A tiny little JSON parsing library in ~150 lines of C99
#107Earlier quoted context omitted.
It's open source, not free software.
The license says otherwise; hard to get freer than public domain.
Re: Sj.h: A tiny little JSON parsing library in ~150 lines of C99
#108What I love about this author's work is that they're usually single-file libraries in ANSI C or Lua with focused scope, easy-to-use interface, and good documentation. And free software license. Aside from the posted project, some I like are: - log.c - A simple logging library implemented in C99 - microui - A tiny immediate-mode UI library - fe - A tiny, embeddable language implemented in ANSI C - microtar - A lightwe…
It's open source, not free software.
[1] https://www.gnu.org/philosophy/free-sw.html [2] https://opensource.org/osd
Re: Sj.h: A tiny little JSON parsing library in ~150 lines of C99
#109Earlier quoted context omitted.
Strongly disagree here because JSON can come from untrusted sources and this has security implications. It's not the same kind of problem that the bloat article discusses where you just have bad contracts on interfaces.
JSON does not necessarily come from untrusted sources if you control the entire system. Not everything needs to be absolutely 100% secure so long as you control the system. If you are opening the system to the public, then sure, you should strive for security, but that isn't always necessary in projects that are not processing public input. Here's an example - I once coded a limited JSON parser in assembly language.…
Isn't that a bit like saying "you don't have to worry about home security as long as you are the only person who has the ability to enter your house"?
Re: Sj.h: A tiny little JSON parsing library in ~150 lines of C99
#110Earlier quoted context omitted.
Very few programming languages default to checked increments. Most Rust or Java programmers would make the same mistake. Writing a function to do a checked addition like in other languages isn't exactly difficult, either.
Yes but those languages have defined overflow.