Re: merging container arrays

2020-10-31 Thread Vino via Digitalmars-d-learn
On Saturday, 31 October 2020 at 15:16:22 UTC, Vino wrote: Hi All, Request your help on the below code, the requirement is that result's are stored in one single container. Code: import asdf; import std.algorithm: map; import std.container.array; import std.stdio: writeln; import

Re: Why is vibe.d json serializer/deserializer so complex?

2020-10-31 Thread Jesse Phillips via Digitalmars-d-learn
On Saturday, 31 October 2020 at 22:42:20 UTC, James Blachly wrote: So I've been meaning to ask this as I have been learning Rust off-and-on recently for web development, and was impressed by the traits functionality. In particular, with traits and some agreed upon API, many packages are

Re: Why is vibe.d json serializer/deserializer so complex?

2020-10-31 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 31 October 2020 at 22:42:20 UTC, James Blachly wrote: On 10/30/20 1:56 PM, Steven Schveighoffer wrote: [...] So I've been meaning to ask this as I have been learning Rust off-and-on recently for web development, and was impressed by the traits functionality. In particular, with

Re: Why is vibe.d json serializer/deserializer so complex?

2020-10-31 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 31 October 2020 at 22:42:20 UTC, James Blachly wrote: be the nearest analog facility in D -- supposing we could agree on a standard API -- to facilitate pluggable serializers? interfaces? could even be informal interfaces where you just use the same function names so something

Re: Why is vibe.d json serializer/deserializer so complex?

2020-10-31 Thread James Blachly via Digitalmars-d-learn
On 10/30/20 1:56 PM, Steven Schveighoffer wrote: I was looking to report an enhancement request to vibe.data.json (filed here: https://github.com/vibe-d/vibe.d/issues/2490), and I started looking at the serialization code for vibe. It's really really complicated, and I'm just wondering if this

merging container arrays

2020-10-31 Thread Vino via Digitalmars-d-learn
Hi All, Request your help on the below code, the requirement is that result's are stored in one single container. Code: import asdf; import std.algorithm: map; import std.container.array; import std.stdio: writeln; import std.typecons: Tuple, tuple; import std.range: lockstep; auto api1()

Re: Json output to container

2020-10-31 Thread Vino via Digitalmars-d-learn
On Friday, 30 October 2020 at 19:33:43 UTC, Paul Backus wrote: On Friday, 30 October 2020 at 19:07:20 UTC, Vino wrote: [...] Here's a working version of the code from your original post: import asdf : parseJson; import std.algorithm; import std.container.array; import std.stdio : writeln;