Thread overview
Json
Jun 11, 2015
Cassio Butrico
Jun 12, 2015
Dennis Ritchie
Jun 12, 2015
Cassio Butrico
Jun 12, 2015
Dennis Ritchie
Jun 12, 2015
Ali Çehreli
Jun 12, 2015
Cassio Butrico
June 11, 2015
What does the .json file and how to use it?
June 12, 2015
On Thursday, 11 June 2015 at 23:58:33 UTC, Cassio Butrico wrote:
> What does the .json file and how to use it?

In D a file with the extension *.json is used to describe packets that are included in your project, the dependency manager DUB.

For example, you can install Eclipse with DDT and create a project with DUB. The file dub.json write the following:
-----
{
    "name" : "myDupApp",
    "description" : "Carbon - Test.",
    "dependencies" : {
        "carbon": "~>1.4.1"
    }
}
-----

Save the file (Ctrl + S). Then in your project with DUB downloaded package `carbon`:
http://code.dlang.org/packages/carbon

After that you can safely use the package `carbon`:
-----
import std.stdio, carbon.linear;;

void main() {
    auto m = matrix!(2, 3, (i, j) => i * 3 + j);
    writeln(m); // [[0, 1, 2], [3, 4, 5]]
}
June 12, 2015
Thank you for answering me so fast , where do I get the DUB for windows ?
June 12, 2015
On Friday, 12 June 2015 at 00:35:35 UTC, Cassio Butrico wrote:
> Thank you for answering me so fast , where do I get the DUB for windows ?

http://code.dlang.org/download
June 12, 2015
On 06/11/2015 04:58 PM, Cassio Butrico wrote:
> What does the .json file and how to use it?

There is also the .json file that is produced by dmd's -X command line switch:

    dmd -X foo.d

That outputs the members of the source code to foo.json in a way that may be useful for a tool.

Ali

June 12, 2015
On Friday, 12 June 2015 at 00:56:45 UTC, Ali Çehreli wrote:
> On 06/11/2015 04:58 PM, Cassio Butrico wrote:
>> What does the .json file and how to use it?
>
> There is also the .json file that is produced by dmd's -X command line switch:
>
>     dmd -X foo.d
>
> That outputs the members of the source code to foo.json in a way that may be useful for a tool.
>
> Ali
Thanks Ali , I did not know that. :)

I really like your tutorial is great for goods .