Question Josh Tennefoss · Dec 9, 2016 JSON, protect against large number truncation in javascript. How can I prevent large number truncation when using the DynamicObject and DynamicArray classes to create JSON in objectscript and then parsing the result in javascript. Are there any global settings that configure the output when using these classes? I am looking at converting to the new DynamicObject and DynamicArray classes to build JSON. Our current (homegrown) JSON library forces string representation of numbers too long because of errors we were seeing with long numbers being truncated on the client, I am hoping to accomplish the same with the new classes. #.NET #Error Handling #JSON #ObjectScript #Caché 0 2 0 1.3K
Question Josh Tennefoss · Dec 9, 2016 Variable types, string vs number Is there any way that I can check the native type of an object script variable? (similar to the typeof check in javascript)I see that the DynamicArray class uses the type of the variable for its output, I would like to do something similar when I receive a value as an argument to my method.USER>s var1 = 123 //No quotes, number type USER>s var2 = "123" //quotes, string type #JSON #ObjectScript #Caché 1 3 0 589