I am using the json_encode to return an array from API to front end. Array contains some large size of keys and values with english and Spanish data. Here I have added the part of array.
Sometimes this json_encode returns empty and sometimes it returns correct data. I am facing this issue for same kind of array values.
what goes wrong with this json_encode?
Array(
[enable_view_map_button_caption] =>
[contact_practice_text] =>
[redirect_verification_page] => N
[enable_cc_on_file] => N
[cc_button_caption] =>
[cc_payment_button_url] =>
[display_completed_paperwok_page] => N
[enable_edit_paperwok] => N
[edit_paperwork_button_text] => Editar
[completed_paperwork_non_editable_page_text] => CompletÃÂÂÂÃÃ
)
echo json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
The array size will be very large, some keys will have more than 30K characters. Will it cause issue at server side?
Note: Here, I cant submit my actual array, due to StackOverflow text limitations.