Getting org.json.jsonexception expected a ' ' when trying to record JSON transactions in VSE recorder
book
Article ID: 105897
calendar_today
Updated On:
Products
CA Application TestCA Continuous Application Insight (PathFinder)Service Virtualization
Issue/Introduction
Getting the below error while recording JSON transactions in the VSE recorder.
org.json.JSONException: Expected a ':' after a key at 989 [character 11 line 47] at org.json.JSONTokener.syntaxError(JSONTokener.java:433) at org.json.JSONObject.(JSONObject.java:212) at org.json.JSONTokener.nextValue(JSONTokener.java:363) at org.json.JSONObject.(JSONObject.java:205) at org.json.JSONTokener.nextValue(JSONTokener.java:363) at org.json.JSONObject.(JSONObject.java:214) at org.json.JSONTokener.nextValue(JSONTokener.java:363) at org.json.JSONArray.(JSONArray.java:115) at org.json.JSONTokener.nextValue(JSONTokener.java:366) at org.json.JSONObject.(JSONObject.java:214) at org.json.JSONTokener.nextValue(JSONTokener.java:363) at org.json.JSONObject.(JSONObject.java:214) at org.json.JSONObject.(JSONObject.java:321)
Environment
All supported DevTest releases.
Cause
Some of the requests had invalid JSON characters and the VSE recorder could not parse the request.
Resolution
Fixed the JSON errors in the application and then re-recorded.
Additional Information
Use any JSON validator available online to validate the requests.