Closed wrighty closed 6 years ago
I extended the test case to include non-falsey values and it appears that they are type juggled to strings:
foo = {
'true' : true,
'one' : 1,
'false' : false,
'zero' : 0,
'null' : null
};
return {
'true' : '{foo.true}',
'one' : '{foo.one}',
'false' : '{foo.false}',
'zero' : '{foo.zero}',
'null' : '{foo.null}',
'original' : '{foo}'
} via route '/typetest' using method get;
Actual response:
{"true":"true","one":"1","original":{"true":true,"one":1,"false":false,"zero":0,"null":null}}
Expected response:
{"true":true,"one":1,"false":false,"zero":0,"null":null,"original":{"true":true,"one":1,"false":false,"zero":0,"null":null}}
Variable references that have falsey values appear to disappear from returned responses
Route:
Actual response from curling
http://localhost:3000/typetest
:Expected response:
Is there a more appropriate way of accessing a single value from a variable reference?