std.net.curl get json_encode

Vino akashvino79 at gmail.com
Fri Oct 9 05:56:05 UTC 2020


On Friday, 9 October 2020 at 05:30:34 UTC, ikod wrote:
> On Friday, 9 October 2020 at 01:45:37 UTC, Vino wrote:
>> On Friday, 2 October 2020 at 23:20:48 UTC, Imperatorn wrote:
>>> On Friday, 2 October 2020 at 21:12:09 UTC, Vino wrote:
>>>> Hi All,
> ...
>> auto content = https.perform();
>> https.shutdown;
>> JSONValue jv = parseJSONValue(content);
>
> Maybe
> JSONValue jv = toJSONValue(content);
>
>
>> writeln(jv["Name"]);
>>
>> }
>>
>> From,
>> Vino

Hi Ikod,

   No luck.

Error
test.d(19): Error: template `stdx.data.json.parser.toJSONValue` 
cannot deduce function from argument types `!()(int)`, candidates 
are:
C:\D\dmd2\windows\bin\..\..\src\phobos\stdx\data\json\parser.d(58):        `toJSONValue(LexOptions options = LexOptions.init, Input)(Input input, string filename = "", int maxDepth = defaultMaxDepth)`
   with `options = cast(LexOptions)0,
        Input = int`
   whose parameters have the following constraints:
   `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
`  > isInputRange!Input
       - isSomeChar!(ElementType!Input)
         or:
       - isIntegral!(ElementType!Input)
`  `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
C:\D\dmd2\windows\bin\..\..\src\phobos\stdx\data\json\parser.d(65):        `toJSONValue(Input)(Input tokens, int maxDepth = defaultMaxDepth)`
   with `Input = int`
   whose parameters have the following constraints:
   `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
`  > isJSONTokenInputRange!Input
`  `~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
datacoll.d(19):        All possible candidates are marked as 
`deprecated` or `@disable`
   Tip: not satisfied constraints are marked with `>`

From,
Vino


More information about the Digitalmars-d-learn mailing list