Title: Code Reference example error
Last modified: March 27, 2021

---

# Code Reference example error

 *  [crawford4](https://wordpress.org/support/users/crawford4/)
 * (@crawford4)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-reference-example-error/)
 * **Function reference for update_post_meta**
 * In the section on Character Escaping, the first example incorrectly double-escapes
   the JSON on line 2 thus:
 * $escaped_json = ‘{“key”:”value with \\”escaped quotes\\””}’;
 * It should read:
 * $escaped_json = ‘{“key”:”value with \”escaped quotes\””}’;
 * The second example (Workaround) is correct.
    -  This topic was modified 5 years, 6 months ago by [crawford4](https://wordpress.org/support/users/crawford4/).

 The topic ‘Code Reference example error’ is closed to new replies.

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 0 replies
 * 1 participant
 * Last reply from: [crawford4](https://wordpress.org/support/users/crawford4/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/code-reference-example-error/)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
