我想从scala中的neo4j列表返回json格式
我有一个包含集合的列表,但当它返回结果时,它会在我的应用程序中输出如下内容:我想从scala中的neo4j列表返回json格式,json,scala,jdbc,neo4j,driver,Json,Scala,Jdbc,Neo4j,Driver,我有一个包含集合的列表,但当它返回结果时,它会在我的应用程序中输出如下内容: [Record<{post: node<166>, comments: [node<168>, node<168>, node<169>, node<169>], likes: [node<171>, node<172>, node<171>, node<172>], comment_count: 4, l
[Record<{post: node<166>, comments: [node<168>, node<168>, node<169>, node<169>], likes: [node<171>, node<172>, node<171>, node<172>], comment_count: 4, like_count: 4}>]
但这是我想要的结果:
[{
"post": "{"
post_title ":"
Hadoop Tutorial ","
post_date ":"
2017 - 09 - 03 ","
post_description ":"
This tutorial is a very simple explanation on haoop ","
postID ":2,"
post_email ":"
steve @yahoo.com ","
memberID ":3}",
"comments": "[]",
"likes": "[]",
"comment_count": 0,
"like_count": 0
},
{
"post": "{"
post_title ":"
The Bamboo Tree ","
post_date ":"
2017 - 09 - 01 ","
post_description ":"
This is the wonder tree,
one of African greatest blessings ","
postID ":1,"
post_email ":"
james @yahoo.com ","
memberID ":2}",
"comments": "[{"
comment_text ":"
This is a fantastice post ","
email_email ":"
steve @yahoo.com ","
comment_email ":"
steve @yahoo.com ","
commentID ":1,"
comment_date ":"
2017 - 09 - 03 ","
postID ":1,"
memberID ":3},{"
comment_text ":"
This is a fantastice post ","
email_email ":"
steve @yahoo.com ","
comment_email ":"
steve @yahoo.com ","
commentID ":1,"
comment_date ":"
2017 - 09 - 03 ","
postID ":1,"
memberID ":3},{"
comment_text ":"
Well said ","
email_email ":"
carl @yahoo.com ","
comment_email ":"
carl @yahoo.com ","
commentID ":2,"
comment_date ":"
2017 - 09 - 03 ","
postID ":1,"
memberID ":1},{"
comment_text ":"
Well said ","
email_email ":"
carl @yahoo.com ","
comment_email ":"
carl @yahoo.com ","
commentID ":2,"
comment_date ":"
2017 - 09 - 03 ","
postID ":1,"
memberID ":1}]",
"likes": "[{"
likeID ":1,"
postID ":1,"
like_email ":"
steve @yahoo.com ","
like_date ":"
2017 - 09 - 03 ","
memberID ":3},{"
likeID ":2,"
postID ":1,"
like_email ":"
joe @yahoo.com ","
like_date ":"
2017 - 09 - 03 ","
memberID ":4},{"
likeID ":1,"
postID ":1,"
like_email ":"
steve @yahoo.com ","
like_date ":"
2017 - 09 - 03 ","
memberID ":3},{"
likeID ":2,"
postID ":1,"
like_email ":"
joe @yahoo.com ","
like_date ":"
2017 - 09 - 03 ","
memberID ":4}]",
"comment_count": 4,
"like_count": 4
}
]
[{
"post": "{"
post_title ":"
Hadoop Tutorial ","
post_date ":"
2017 - 09 - 03 ","
post_description ":"
This tutorial is a very simple explanation on haoop ","
postID ":2,"
post_email ":"
steve @yahoo.com ","
memberID ":3}",
"comments": "[]",
"likes": "[]",
"comment_count": 0,
"like_count": 0
},
{
"post": "{"
post_title ":"
The Bamboo Tree ","
post_date ":"
2017 - 09 - 01 ","
post_description ":"
This is the wonder tree,
one of African greatest blessings ","
postID ":1,"
post_email ":"
james @yahoo.com ","
memberID ":2}",
"comments": "[{"
comment_text ":"
This is a fantastice post ","
email_email ":"
steve @yahoo.com ","
comment_email ":"
steve @yahoo.com ","
commentID ":1,"
comment_date ":"
2017 - 09 - 03 ","
postID ":1,"
memberID ":3},{"
comment_text ":"
This is a fantastice post ","
email_email ":"
steve @yahoo.com ","
comment_email ":"
steve @yahoo.com ","
commentID ":1,"
comment_date ":"
2017 - 09 - 03 ","
postID ":1,"
memberID ":3},{"
comment_text ":"
Well said ","
email_email ":"
carl @yahoo.com ","
comment_email ":"
carl @yahoo.com ","
commentID ":2,"
comment_date ":"
2017 - 09 - 03 ","
postID ":1,"
memberID ":1},{"
comment_text ":"
Well said ","
email_email ":"
carl @yahoo.com ","
comment_email ":"
carl @yahoo.com ","
commentID ":2,"
comment_date ":"
2017 - 09 - 03 ","
postID ":1,"
memberID ":1}]",
"likes": "[{"
likeID ":1,"
postID ":1,"
like_email ":"
steve @yahoo.com ","
like_date ":"
2017 - 09 - 03 ","
memberID ":3},{"
likeID ":2,"
postID ":1,"
like_email ":"
joe @yahoo.com ","
like_date ":"
2017 - 09 - 03 ","
memberID ":4},{"
likeID ":1,"
postID ":1,"
like_email ":"
steve @yahoo.com ","
like_date ":"
2017 - 09 - 03 ","
memberID ":3},{"
likeID ":2,"
postID ":1,"
like_email ":"
joe @yahoo.com ","
like_date ":"
2017 - 09 - 03 ","
memberID ":4}]",
"comment_count": 4,
"like_count": 4
}
]