Skip to main content

We are using https://www.toptal.com/developers/json-formatter to test validate our strings from our logs into json strings for creating a ticket.

We had a verified json string, but an error when creating the ticket.  The ticket works sending just “123”

Any ideas?

 


"description": "<pre&gt;***************************************************************************************************&lt;br&gt;QQube Synchronizer - Starting Time: 06/22/2024 12:05:28 PM - Setup Wizard&lt;br&gt;Application Version 10.1&lt;/pre&gt;", 
"subject": "Log file from #0 Demo User Success 6/22/2024 12:05:28 PM Full", 
"email": "[email protected]", 
"priority": 1, 
"status": 1 
}

Hi @cpv,

 

Greetings from Freshworks community. Could you please let me know what is the response code received ? Please use Postman to use the same payload to check the response code and also, Please make sure you pass all the mandatory ticket fields that are set under Admin > Ticket fields which are required during ticket creation.


It sounds like you're trying to validate a JSON string for creating a ticket, but you're running into errors. If you're looking to add a specific key to your JSON and need help validating it online, here’s a step-by-step approach you can follow:

  1. Fix JSON Format: Ensure your JSON format is correct. JSON should have key-value pairs and be enclosed in curly braces {}. For example:

     

    json

    CopyEdit

    { "ticket_id": "12345", "subject": "Issue with login", "priority": "High", "description": "Unable to log into the system", "created_at": "2025-04-21T10:30:00" }

  2. Add New Key: If you need to add a new key (for example, "status": "open"), it should be done like this:

     

    json

    CopyEdit

    { "ticket_id": "12345", "subject": "Issue with login", "priority": "High", "description": "Unable to log into the system", "created_at": "2025-04-21T10:30:00", "status": "open" }

  3. Validate the JSON: You can use an online JSON validator like:

  4. Fix Errors: If you see any errors when you validate the JSON, the validator will usually point out exactly what’s wrong (like missing commas, incorrect key-value pairs, or extra characters). Make sure everything is formatted correctly.

  5. Check API Expectations: If you're submitting this JSON to an API (like for ticket creation), make sure the keys and their data types match what the API expects. Sometimes a missing key or invalid value type can cause errors.

If you want, you can share the exact JSON string and the error message you're getting, and I can help you troubleshoot further!


Reply