#json5 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #json5, aggregated by home.social.
-
#PSA : using #json formatted config files in #python
Just learned about #json5
json data format is close to python dict;
json5 is closer:-)it allows trailing commas but It doesn't have python comments so we still have to remember how to use /* comments*/.
There are other niceties and full conversion back to json if needed.
#floss #foss #software #openSource #democracy is more than how we vote -
#PSA : using #json formatted config files in #python
Just learned about #json5
json data format is close to python dict;
json5 is closer:-)it allows trailing commas but It doesn't have python comments so we still have to remember how to use /* comments*/.
There are other niceties and full conversion back to json if needed.
#floss #foss #software #openSource #democracy is more than how we vote -
⚡ Why are developers switching from JSON to JSON5?
Because modern projects need:
📝 Comments
✨ Cleaner syntax
🔧 Better maintainability
🚀 Faster development workflowsRead the full article 👇
https://medium.com/@99tools/why-developers-are-quietly-switching-from-json-to-json5-66260bcc5720
#Developers #JSON5 #Programming #TechCommunity #SoftwareEngineering #Code #WebDev #JavaScriptDeveloper #DeveloperExperience
-
wait... wait! are you telling me that #pnpm supports `package.json5` instead of `package.json`??? and I learn about it years later?
I've been praying for something like this for ages... and it turns out that we already had it.
-
wait... wait! are you telling me that #pnpm supports `package.json5` instead of `package.json`??? and I learn about it years later?
I've been praying for something like this for ages... and it turns out that we already had it.
-
contemplating making a #JSON5 -> YAML transpiler just to never write any more YAML.
-
contemplating making a #JSON5 -> YAML transpiler just to never write any more YAML.
-
-
@srob True. And there is a Dart package for it so perhaps I could use it instead of the built-in parser library...hmm...
-
@srob True. And there is a Dart package for it so perhaps I could use it instead of the built-in parser library...hmm...
-
So I noticed the lack of prominent #JSON5 parsers for C++, and made one of my own: https://github.com/mortie/json5cpp
The goal is to be simple, robust, and a very small dependency for projects which already use JsonCpp.
Thoughts?
-
@slightlyoff I use #JSON5 in a Chrome Extension I own solely to comment the manifest and it works great.
I do think the bigger issue is that JSON is a terrible configuration language (but great wire format!). We should be using #TOML, #YAML, or something else more targeted for that use case.
-
@slightlyoff I use #JSON5 in a Chrome Extension I own solely to comment the manifest and it works great.
I do think the bigger issue is that JSON is a terrible configuration language (but great wire format!). We should be using #TOML, #YAML, or something else more targeted for that use case.
-
-