Tag: gson

使用gson:MalformedJsonException解析Json File

我想读一个像JSON-File一样的字符串并在屏幕上打印。 因此我使用的是GSON-Library。 每次我想编译时,我在线程“main”com.google.gson.JsonSyntaxException错误中得到一个exception 我的代码看起来像这样 public class Test { public static void main(String… args) throws Exception { String json = “{” + “‘tag_name’ : ‘M mit Mbrunnen’,” + “‘tag_id’ : ‘de_bw_xx_mstall’,” + “‘tag_description’: ‘false’,” + “‘tag_latitude’: ‘42.704895’,” + “‘tag_longitude’: ‘10.652187’,” + “‘tag_description_f_a’: ‘Ein weiteres Highlight in H’,” + “}”; // Now do the magic. Data data […]