BigDecimal array in JSON Interface: Unable to match parameter array
Feb 9, 2012
Hello,
I am trying to call an Insert procedure using the JSON interface. One of the Java run method parameters is a BigDecimal array.
The client calls this (abbreviated) URL:
http://[IP]:8080/api/1.0/?Procedure=[procedure name]&Parameters=[...,"32.12"]
The response is:
{"status":-2,"appstatus":-128,"statusstring":"VOLTDB ERROR: PROCEDURE [procedure name] TYPE ERROR FOR PARAMETER 4: tryScalarMakeCompatible: Unable to match parameter array:java.math.BigDecimal to provided java.lang.String","appstatusstring":null,"exception":null,"results":[]}
A simple insert procedure (taking BigDecimal, as opposed to BigDecimal[]) works. What is the correct JSON representation of a BigDecimal array?
The only thing I have found in the VoltDB source code is a test case with an empty BigDecimal array (TestJSONInterface.java).
Thanks,
Sebastian
I am trying to call an Insert procedure using the JSON interface. One of the Java run method parameters is a BigDecimal array.
The client calls this (abbreviated) URL:
http://[IP]:8080/api/1.0/?Procedure=[procedure name]&Parameters=[...,"32.12"]
The response is:
{"status":-2,"appstatus":-128,"statusstring":"VOLTDB ERROR: PROCEDURE [procedure name] TYPE ERROR FOR PARAMETER 4: tryScalarMakeCompatible: Unable to match parameter array:java.math.BigDecimal to provided java.lang.String","appstatusstring":null,"exception":null,"results":[]}
A simple insert procedure (taking BigDecimal, as opposed to BigDecimal[]) works. What is the correct JSON representation of a BigDecimal array?
The only thing I have found in the VoltDB source code is a test case with an empty BigDecimal array (TestJSONInterface.java).
Thanks,
Sebastian