我想从一个url读取json到我的C#应用程序中。当我运行的应用程序,我不断收到一个错误:从URL中读取JSON时出错
“附加文本遇到结束后读取JSON内容:{路径”,2号线,位置667"
这是从这个URL
我检查了网页和查看源代码,似乎无法找到问题的如何解决这个
的JSON从PHP数组JSON编码,并呼应导出:?
$args = array('post_type' => 'product', 'posts_per_page' => 200, 'product_cat' => 'Alcopops');
$loop = new WP_Query($args);
while ($loop->have_posts()) : $loop->the_post();
global $product;
echo json_encode($product);
endwhile;
wp_reset_query();
环绕的Json用方括号。 –
你使用过WebClient吗? –
@SirwanAfifi我用'HttpClient client = new HttpClient(); // HttpResponseMessage response = await client.GetAsync(App.DataServiceUrl +“/ products?category =”+(String)navigationParameter);' – Tester