just found this one :
used the JSON xojo example, and modified it to add a currency to the json
Var Person As New JSONItem
Dim c As Currency = 27.32
// This object is manipulated like a dictionary
Person.Value("Name") = "John Doe"
Person.Value("Age") = 32
Person.Value("Married") = True
Person.Value("curr") = c
Person.Value("Spouse") = "Jane Doe"
Var s As String = Person.ToString
it fails with a “invalidargumentexception” …
if I change the “c” with “c.toString” everything is ok …
is it normal you can’t add a currency to a JSONItem ? it should be converted to a double ?
4 posts - 4 participants