Android not read all line from json file -


i trying read content local json file, not return line in json file return line only. below code:

public string loadjsonfromasset() {          stringbuilder text = new stringbuilder();          try {             final inputstream file = this.getresources().openrawresource(r.raw.tv);             bufferedreader br = new bufferedreader(new inputstreamreader(file));             string line;             while ((line = br.readline()) != null) {                 text.append(line);                 text.append("\n");                 log.d("string",line);             }         }         catch (ioexception e) {             e.printstacktrace();         }         log.d("sdfsdf",text.tostring());          return text.tostring();     } 

and result :

{         "items": [           {             "title": "tv5",             "link": "http://mobile.interface.stmg.net.kh/nn_cms/nn_cms_view/jpz/n3_a_a.php?nns_version=2.3.7.0.2.sc-jpz-ipad.0.0_release&nns_output_type=json&nns_user_agent=nn_pad/ipad/1.0.0&nns_language=en_us&nns_tag=28&nns_user_id=ipadb123456789089756745634523456ca&nns_device_id=&nns_buss_id=2000002&nns_category_id=1000001&nns_func=apply_play_video&nns_mac_id=112233445566&nns_media_assets_id=pad_live_v1&nns_media_id=c35345c8f040ffd74caddacff3d8b847&nns_video_id=3faaa5c9171d8529795749c88040b5ec&nns_video_index=0&nns_video_type=1",             "thumbnail": "tv5.png",             "direct" : false           },           {             "title": "ctn",             "link": "http://mobile.interface.stmg.net.kh/nn_cms/nn_cms_view/jpz/n3_a_a.php?nns_version=2.3.7.0.2.sc-jpz-ipad.0.0_release&nns_output_type=json&nns_user_agent=nn_pad/ipad/1.0.0&nns_language=en_us&nns_tag=28&nns_user_id=ipadb123456789089756745634523456&nns_device_id=&nns_buss_id=2000002&nns_category_id=1000001&nns_func=apply_play_video&nns_mac_id=112233445566&nns_media_assets_id=pad_live_v1&nns_media_id=f4bb36746f145be94deb9c17d0965f74&nns_video_id=f942ece95cb181ee4111c9921737b575&nns_video_index=0&nns_video_type=1",             "thumbnail": "ctn.png",             "direct" : false           },           {             "title": "mytv",             "link": "http://mobile.interface.stmg.net.kh/nn_cms/nn_cms_view/jpz/n3_a_a.php?nns_version=2.3.7.0.2.sc-jpz-ipad.0.0_release&nns_output_type=json&nns_user_agent=nn_pad/ipad/1.0.0&nns_language=en_us&nns_tag=28&nns_user_id=ipadb123456789089756745634523456&nns_device_id=&nns_buss_id=2000002&nns_category_id=1000001&nns_func=apply_play_video&nns_mac_id=112233445566&nns_media_assets_id=pad_live_v1&nns_media_id=a89cdd8c6279eb0b584627e0f571a698&nns_video_id=00d0bfe34121cd8a998a4bf7fffd2c19&nns_video_index=0&nns_video_type=1",             "thumbnail": "mytv.png",             "direct" : false           },           {             "title": "msjtv",             "link": "rtmp://124.248.165.18:1935/live/mystream",             "thumbnail": "msj.png",             "direct" : true           },           {             "title": "atv",             "link": "rtmp://113.161.212.25/live2",             "thumbnail": "atv.png",             "direct" : true           },           {             "title": "cnc",             "link": "http://mobile.interface.stmg.net.kh/nn_cms/nn_cms_view/jpz/n3_a_a.php?nns_version=2.3.7.0.2.sc-jpz-ipad.0.0_release&nns_output_type=json&nns_user_agent=nn_pad/ipad/1.0.0&nns_language=en_us&nns_tag=28&nns_user_id=ipadb123456789089756745634523456&nns_device_id=&nns_buss_id=2000002&nns_category_id=1000001&nns_func=apply_play_video&nns_mac_id=112233445566&nns_media_assets_id=pad_live_v1&nns_media_id=51cb3efed11a0094944cc78c7f950fdd&nns_video_id=305c725d29f8e7b9684e09e9d463669e&nns_video_index=0&nns_video_type=1",             "thumbnail": "cnc.png",             "direct" : false           },           {             "title": "ntv",             "link": "http://mobile.interface.stmg.net.kh/nn_cms/nn_cms_view/jpz/n3_a_a.php?nns_version=2.3.7.0.2.sc-jpz-ipad.0.0_release&nns_output_type=json&nns_user_agent=nn_pad/ipad/1.0.0&nns_language=en_us&nns_tag=28&nns_user_id=ipadb123456789089756745634523456&nns_device_id=&nns_buss_id=2000002&nns_category_id=1000001&nns_func=apply_play_video&nns_mac_id=112233445566&nns_media_assets_id=pad_live_v1&nns_media_id=f1d34949aa405f5ff7bf9be51c9c48eb&nns_video_id=e72a42883ca4461c22b396c248cdb3c9&nns_video_index=0&nns_video_type=1",             "thumbnail": "ntv.png",             "direct" : false           },           {             "title": "tv9",             "link": "http://mobile.interface.stmg.net.kh/nn_cms/nn_cms_view/jpz/n3_a_a.php?nns_version=2.3.7.0.2.sc-jpz-ipad.0.0_release&nns_output_type=json&nns_user_agent=nn_pad/ipad/1.0.0&nns_language=en_us&nns_tag=28&nns_user_id=ipadb123456789089756745634523456ca&nns_device_id=&nns_buss_id=2000002&nns_category_id=1000001&nns_func=apply_play_video&nns_mac_id=112233445566&nns_media_assets_id=pad_live_v1&nns_media_id=1745e6557435c9a424a1627642f39439&nns_video_id=07dbc29ba75ab5b8c5e2b300818ab6b9&nns_video_index=0&nns_video_type=1",             "thumbnail": "tv9.png",             "direct" : false           },           {             "title": "tv3",             "link": "http://mobile.in 

please suggest best solution me, thanks,

if result printed in logs may character limit log. use debugger value of json , try use online tool convert json http://jsonviewer.stack.hu/


Comments