You need to sign in to do that
Don't have an account?
eriktown
No such method error when calling JSONObject.getInt
Hello all,
I'm using Ron Hess's JSONObject port and I'm having a strange issue. getString works fine, but trying to call getInt results in a compiler warning that says there is no such method. I can see perfectly well that JSONObject.cls has a public method called getInt which has the right signature, but the Apex compiler just doesn't seem to understand that!
Does anyone know what the problem might be?
let me brief both the method signatures once then it will be very clear..
Use 'optInt' instead 'getint'... might solve your problem.
Tried that, unfortunately I got the same error.
Have you looked into the JSON class? See if the code is not missing anything. Please post some code here and the error message too.