On Thu, 22 Feb 2018 10:41:48 +0000, psychoticRabbit wrote:

> On Tuesday, 20 February 2018 at 15:26:12 UTC, Adam D. Ruppe wrote:
>> dmd -X spits out the json file with a list of functions and classes and
>> other stuff. Then you can just filter that.
> 
> do you know why the first and last character of the output from "dmd -o-
> -X somefile.d" are [  and  ] with all the json inbetween.
> 
> I'm don't really know json (never had a need to know) but as I try
> different json parsers, the first thing I have to do (before giving it
> to the json parser), is strip off the first and last character of that
> output.
> 
> so why put them there in the first place, is my question.

They form an array.

`[1, 2, 3]` is an array of numbers, and 
`[{"a":1}, {"b":2}, {"c":3}]` is an array of objects.

Reply via email to