Originally posted by anne clifford
When posting to the job endpoint I was getting some kind of error/warning when submitting a large amount of text in the job_description field. Is there a character limit that I need to be aware of?
Originally posted by anne clifford
When posting to the job endpoint I was getting some kind of error/warning when submitting a large amount of text in the job_description field. Is there a character limit that I need to be aware of?
I’ve found large text usually contains characters that possibly break the json string
Eg most common is a user will use “double quote“ inside the description these characters and others need to be escaped
Example:
Original value: He said, "Hello" to everyone.
In a JSON string: "He said, \\"Hello\\" to everyone."
JavaScript: Use JSON.stringify() to convert an object or value into a JSON-formatted string.
javascript
const data = {
"message": 'He said, "Hello" to everyone.'
};
const jsonString = JSON.stringify(data);
// Result: {"message":"He said, \"Hello\" to everyone."}
Python: Use json.dumps() from the built-in json module.
python
import json
data = {"message": 'He said, "Hello" to everyone.'}
json_string = json.dumps(data)
# Result: {"message": "He said, \"Hello\" to everyone."}
If you are using automation as a service platforms like make, zapier or others you need to use a formatting module or find and replace formula to escape special characters.
Hi all,
In the current API docs, job_description is defined as a string field, and no maximum length is listed for it in the Jobs schema.
More generally, our developer docs note that string fields have “No length limits unless otherwise specified”.
If you’re getting errors when sending large descriptions, it’s worth checking the response details. The Jobs endpoint expects an application/json request body, and will return a 400 Bad Request if the request is malformed or contains invalid parameters.
If it’s still failing, reply here with the HTTP status code and the error response body (with any customer data removed) and we can help interpret it.
Thanks,
Cody