question

47agent avatar image
47agent asked

Need Urgent help (Someone fluent with JSON can help)

Hi all, I have been working with ASK for a while now. I ran into a weird problem today. I have a HashMap in my java code and I save the object in the session attribute. When I get the object back in the next call and cast it back to HashMap , there are no errors with casting (there is warning for unchecked casting though). But the "Long" type of the keys are converted to "String" for some reason. I want it to be cast back to "Long". Any help with this matter would be appreciated!
alexa skills kitdebugging
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Matt Kruse avatar image
Matt Kruse answered
In JSON, keys must be strings. You cannot use numeric keys in objects.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.