Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
June 12, 2015 Re: Json | ||||
---|---|---|---|---|
| ||||
Posted in reply to Cassio Butrico | 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 Re: Json | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dennis Ritchie | Thank you for answering me so fast , where do I get the DUB for windows ? |
June 12, 2015 Re: Json | ||||
---|---|---|---|---|
| ||||
Posted in reply to Cassio Butrico | 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 Re: Json | ||||
---|---|---|---|---|
| ||||
Posted in reply to Cassio Butrico | 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 Re: Json | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ali Çehreli | 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 .
|
Copyright © 1999-2021 by the D Language Foundation