digitalmars.D.learn - Recommendations for best JSON lib?
- Nick Sabalausky (Abscissa) (2/2) Apr 20 2019 I only need to read arbitrary JSON data, no need for
- Guillaume Piolat (7/9) Apr 20 2019 std.json is simple as pie.
- evilrat (9/14) Apr 20 2019 However IIRC it fails with trailing commas, means that for
- Guillaume Piolat (3/19) Apr 21 2019 I wrote a JSON parser just for this use case
- Arjan (3/8) Apr 21 2019 What was the problem with asdf? I've succesfully used it in the
- Seb (2/18) Apr 21 2019 Experimental std.json is based on vibe.d's JSON package.
I only need to read arbitrary JSON data, no need for writing/(de)serialization.
Apr 20 2019
On Saturday, 20 April 2019 at 18:49:07 UTC, Nick Sabalausky (Abscissa) wrote:I only need to read arbitrary JSON data, no need for writing/(de)serialization.std.json is simple as pie. import std.json: parseJSON; import std.file: read; JSONValue dubFile = parseJSON(cast(string)(read("dub.json"))); string name = dubFile["name"].str;
Apr 20 2019
On Saturday, 20 April 2019 at 20:44:22 UTC, Guillaume Piolat wrote:On Saturday, 20 April 2019 at 18:49:07 UTC, Nick Sabalausky (Abscissa) wrote:However IIRC it fails with trailing commas, means that for reading user written JSON's it might be annoying. I also tried experimental std json, asdf and vibe.d. The only one that worked for me is vibe.d JSON subpackage, and adding simple commented lines stripping is simple with phobos, because there is absolutely no libraries that can handle JSON comments yet. (yes, I know it's not standard)I only need to read arbitrary JSON data, no need for writing/(de)serialization.std.json is simple as pie.
Apr 20 2019
On Sunday, 21 April 2019 at 02:09:29 UTC, evilrat wrote:On Saturday, 20 April 2019 at 20:44:22 UTC, Guillaume Piolat wrote:I wrote a JSON parser just for this use case https://gitlab.com/AuburnSounds/rub/blob/master/source/permissivejson.dOn Saturday, 20 April 2019 at 18:49:07 UTC, Nick Sabalausky (Abscissa) wrote:However IIRC it fails with trailing commas, means that for reading user written JSON's it might be annoying. I also tried experimental std json, asdf and vibe.d. The only one that worked for me is vibe.d JSON subpackage, and adding simple commented lines stripping is simple with phobos, because there is absolutely no libraries that can handle JSON comments yet. (yes, I know it's not standard)I only need to read arbitrary JSON data, no need for writing/(de)serialization.std.json is simple as pie.
Apr 21 2019
On Sunday, 21 April 2019 at 02:09:29 UTC, evilrat wrote:On Saturday, 20 April 2019 at 20:44:22 UTC, Guillaume Piolat wrote:What was the problem with asdf? I've succesfully used it in the past.On Saturday, 20 April 2019 at 18:49:07 UTC, Nick SabalauskyI also tried experimental std json, asdf and vibe.d. The only one that worked for me is vibe.d JSON subpackage, and
Apr 21 2019
On Sunday, 21 April 2019 at 02:09:29 UTC, evilrat wrote:On Saturday, 20 April 2019 at 20:44:22 UTC, Guillaume Piolat wrote:Experimental std.json is based on vibe.d's JSON package.On Saturday, 20 April 2019 at 18:49:07 UTC, Nick Sabalausky (Abscissa) wrote:However IIRC it fails with trailing commas, means that for reading user written JSON's it might be annoying. I also tried experimental std json, asdf and vibe.d. The only one that worked for me is vibe.d JSON subpackage, and adding simple commented lines stripping is simple with phobos, because there is absolutely no libraries that can handle JSON comments yet. (yes, I know it's not standard)I only need to read arbitrary JSON data, no need for writing/(de)serialization.std.json is simple as pie.
Apr 21 2019