## TL;DR

The JSON body is malformed: a trailing comma, single quotes, unescaped characters, or a truncated payload. Validate the exact bytes you sent with a JSON parser, fix the syntax, and resend. The API never parses partial JSON; the whole body must be valid.

## Error

```text
[ {
  "message" : "Unexpected character ('}' (code 125)): was expecting double-quote to start field name",
  "errorCode" : "JSON_PARSER_ERROR"
} ]
```

## Steps

1. Log the exact request body bytes your client sent, not the object you think you sent. Expected: you see the real payload including any truncation.
2. Run it through a JSON validator (python -m json.tool on the logged bytes). Expected: the validator points at the exact character.
3. Fix the syntax: remove trailing commas, use double quotes, escape control characters in string values. Expected: the payload validates cleanly.
4. Confirm the Content-Type header is application/json. Expected: the API parses the body as JSON instead of rejecting it.
5. If the payload is built by string concatenation, switch to a real JSON serializer. Expected: malformed bodies stop occurring.

## When to use

- REST calls fail with JSON_PARSER_ERROR.
- An agent builds JSON by hand and intermittent calls fail (interpolation bugs).
- After adding a new field with special characters to the payload.

## When not to use

- XML API errors (different parser).
- 400s with valid JSON (then the data is wrong, not the syntax).

## Tool compatibility

- Salesforce REST API; any HTTP client.
- JSON serializers in Python, Node, and Java.

## Variant phrasings

### Unexpected character in JSON

The parser names the offending character; look just before it.

### was expecting double-quote to start field name

Usually a trailing comma or single quotes.

## Why it happens

Hand-built JSON breaks on edge data URIs quotes inside names, newlines in text fields, and unicode that was not escaped. Serializers handle all of this; string templates do not.

## Edge cases

- Truncated bodies from timeouts parse as unexpected end of input; check content length.
- Emoji and unicode need proper UTF-8; mis-encoded bytes fail the parser.
- Composite API subrequests each need valid JSON; one bad subrequest fails the batch.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_NAqID4yCojficJaTQRoqpw
