dmd json file output

kenji hara k.hara.pg at gmail.com
Sun Jan 20 23:50:47 PST 2013


I think there is no problem.

Kenji Hara


2013/1/21 Walter Bright <newshound2 at digitalmars.com>

> The current version is pretty verbose. For:
>
>     int ***x;
>
> it will emit as the type:
>
> "type" : {
>         "kind" : "pointer",
>         "pretty" : "int***",
>         "targetType" : {
>                 "kind" : "pointer",
>                 "pretty" : "int**",
>                 "targetType" : {
>                         "kind" : "pointer",
>                         "pretty" : "int*",
>                         "targetType" : {
>                                 "kind" : "int",
>                                 "pretty" : "int"
>                         }
>                 }
>         }
> }
>
> I find this to be excessive, and it helps to produce truly gigantic .json
> files. I think it's better to just put out the deco for the type:
>
> "type" : "PPPi"
>
> But, you might say, that is not user friendly! Nope, it isn't. But the
> .json output is for a machine to read, not humans, and the deco types are
> very space efficient, and are trivial to convert to whatever data structure
> the reader needs. Much easier than the verbose thing.
>
> What do you think?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130121/9216687d/attachment.html>


More information about the Digitalmars-d mailing list