79110610

Date: 2024-10-21 15:00:53
Score: 1
Natty:
Report link

in my case I was setting content type header to 'application/json' and returning "something like a json response" processResults fired just when I forced my response as "json_encode" (PHP)

i.e. returning

{results:[{id: 1,text:"one option"},{id: 2, text: "another option"}]}

did not work. But

{"results":[{"id":"1","text":"one option"},{"id":"2","text":"another option"}] }

did. So as of PHP returning

json_encode( (object)array('results'=>array((object)array('id'=>1, 'text'=>'opt.1'))))

worked OK

Reasons:
  • Blacklisted phrase (1): did not work
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Enrique Vizioli