Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3791

Unable to add a currency value to a JSONItem?

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 3791

Trending Articles