javascript - jQuery.parseJSON stop working when passed more data -


i have script query database , echo out json code results.
javascript takes , store in variable using jquery.parsejson method populates text box autocomplete.
works perfect if return less 30 rows on database query.
looks jquery.parsejson method fails when passed more data.

how change code make able parse more data?

thank help.

json code:

{     "display":true,     "url":"http://project-url",     "autocomplete":     [         {             "value":"1",             "desc":"ford",             "model":"edge",             "label":"1 ford edge"         },         {             "value":"2",             "desc":"toyota",             "model":"camry",             "label":"2 toyota camry"         },         {             "value":"3",             "desc":"honda",             "model":"accord",             "label":"3 honda accord"         },         {             "value":"4",             "desc":"honda",             "model":"civic",             "label":"4 honda civic"         }     ] } 

javascript code:

var data = $.parsejson(jsonvar);  $('#value-input').autocomplete( {     source: data.autocomplete,     minlength: 3,     select: function(event, ui)     {         $('#desc-input').val(ui.item.desc);     } }); 

without code can make assumptions, in case jquery.parsejson support bigger data, problem json, maybe character broking json or not related size of rows returns database.

you can validate json here

can include json produce error? or can validate json in link provided above check if problem json?


Comments

Popular posts from this blog

ios - Is 'init' forbidden as *part* of a variable name? -

javascript - Why Selenium can't find an element that is graphically visible -

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -