I am generating a JSON from a database query. When I get the data, I store it in an array and then apply it json_encode
to create a JSON object.
Everything works fine, but I want to know if it is possible to prevent it from json_encode
changing the accented characters.
For example, I create data like this:
"antifona": "\u00c1breme los ojos, Se\u00f1or, y contemplar\u00e9 las maravillas de tu voluntad.",
...
I want my data with their accents, because I already have them validated, so I don't need it to json_encode
generate my values like that.
Can that be done somehow? I was checking in the PHP Manual and I didn't see any mention of that possibility.
I would like the following result:
"antifona": "Ábreme los ojos, Señor, y contemplaré las maravillas de tu voluntad.",
...