MkyTaP - 開發筆記
主要工具: Linux, Python, SQL
Showing posts with label
json
.
Show all posts
Showing posts with label
json
.
Show all posts
Monday, March 19, 2018
javascript: 打印json
如果用console.log輸出json,瀏覽器會自動分析成obj,無法以字串形式儲存,需要用JSON.stringify(obj);才可以將json以string 來輸出。
如下︰
obj = [{id:1}, {id:2}]
<< console.log(obj)
>> "[object Object],[object Object]"
<< console.log(JSON.stringify(obj));
>> "[{id:1}, {id:2}]"
Tuesday, November 7, 2017
Scala: Json4s
https://github.com/json4s/json4s
Older Posts
Home
Subscribe to:
Posts (Atom)