我必须运行此命令来将代码修复为xml文件:
java -Xmx5G -cp .:jsoup-1.8.2.jar CheckSyntax test.xml > test2.xml
Run Code Online (Sandbox Code Playgroud)
但它给了我这个错误:
Invalid maximum heap size: -Xmx5G
The specified size exceeds the maximum representable size.
Run Code Online (Sandbox Code Playgroud)
我怎样才能使它工作?
我试图使用PHP解析JSON文件.然后我将提取的数据放在MySQL数据库中.
这是我的JSON文件
{"u":[
{"text":"Chef salad is calling my name, I\u0027m so hungry!",
"id_str":"28965131362770944",
"created_at":"dom gen 23 24:00:00 +0000 2011",
"user":
{"id_str":"27144739",
"screen_name":"LovelyThang80",
"name":"One of A Kind"}},
{....} //Other same code
}
Run Code Online (Sandbox Code Playgroud)
这是我的PHP代码
<?php
//connect to mysql db
//read the json file contents
//convert json object to php associative array
$data = json_decode($jsondata, true);
//prepare variables for insert
$sqlu = "INSERT INTO user(id_user, screen_name, name)
VALUES ";
$sqlt = "INSERT INTO tweet(id_user, date, id_tweet, text)
VALUES ";
//I analyze the whole …Run Code Online (Sandbox Code Playgroud)