Re: Two problems with json and lcd

2020-02-19 Thread AlphaPurned via Digitalmars-d-learn
On Wednesday, 19 February 2020 at 08:47:04 UTC, Petar Kirov [ZombineDev] wrote: On Wednesday, 19 February 2020 at 08:14:34 UTC, AlphaPurned wrote: The first is std.json. It is broke. Doesn't work with tuples. The change above fixes it by treating tuple as an array(same code). It works fine.

Re: Two problems with json and lcd

2020-02-19 Thread Petar via Digitalmars-d-learn
On Wednesday, 19 February 2020 at 08:14:34 UTC, AlphaPurned wrote: The first is std.json. It is broke. Doesn't work with tuples. The change above fixes it by treating tuple as an array(same code). It works fine. Can you post a minimal, but complete program that shows the problems with

Re: Two problems with json and lcd

2020-02-19 Thread AlphaPurned via Digitalmars-d-learn
On Tuesday, 18 February 2020 at 22:00:25 UTC, Petar Kirov [ZombineDev] wrote: On Tuesday, 18 February 2020 at 18:05:43 UTC, AlphaPurned wrote: json has two issues, it doesn't work with tuple: (isArray!T) goes to (isArray!T || (T.stringof.length > 4 && T.stringof[0..5] == "Tuple")) and

Re: Two problems with json and lcd

2020-02-18 Thread Petar via Digitalmars-d-learn
On Tuesday, 18 February 2020 at 18:05:43 UTC, AlphaPurned wrote: json has two issues, it doesn't work with tuple: (isArray!T) goes to (isArray!T || (T.stringof.length > 4 && T.stringof[0..5] == "Tuple")) and right below else { static assert(false, text(`unable

Two problems with json and lcd

2020-02-18 Thread AlphaPurned via Digitalmars-d-learn
json has two issues, it doesn't work with tuple: (isArray!T) goes to (isArray!T || (T.stringof.length > 4 && T.stringof[0..5] == "Tuple")) and right below else { static assert(false, text(`unable to convert type "`, T.Stringof, `" to json`)); } and it