Мне нужно хранить данные вопроса в виде cms, например wordpress
, и использовать конечную точку json
для загрузки в мое приложение. Примерно так:
<question>
What event marked the start of World War II?
</question>
<correct_answer>
Invasion of Poland (1939)
</correct_answer>
<incorrect_answers>
["Invasion of Russia (1942)","Battle of Britain (1940)","Invasion of Normandy (1944)"]
</incorrect_answers>
Проблема в том, что получившийся json выглядит следующим образом: wordpress
вставляет разрывы строк и параграфы:
<p><question><br \/>\nWhat event marked the start of World War II?<br \/>\n<\/question><br \/>\n<correct_answer><br \/>\nInvasion of Poland (1939)<br \/>\n<\/correct_answer><br \/>\n<incorrect_answers><br \/>\n[“Invasion of Russia (1942)”,”Battle of Britain (1940)”,”Invasion of Normandy (1944)”]<br \/>\n<\/incorrect_answers><br \/>\n<question><br \/>\ntesting<br \/>\n<\/question><br \/>\n<correct_answer><br \/>\nyseesf<br \/>\n<\/correct_answer><br \/>\n<incorrect_answers><br \/>\n[“gffdg”,”fdgfdg”,”dfgfdgfd”]<br \/>\n<\/incorrect_answers><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What event marked the start of World War II? Invasion of Poland (1939) [“Invasion of Russia (1942)”,”Battle of Britain (1940)”,”Invasion of Normandy (1944)”] testing yseesf [“gffdg”,”fdgfdg”,”dfgfdgfd”]<\/p>\n
Как я могу использовать такие данные в хранилище более доступным способом?