我正在学习Java和Hadoop,并且看到了无数简单的txt文件的WordCount示例。如何为下面的JSON文件应用此WordCount示例?我在读取Mapper的每个JSON对象中的每一行时遇到了麻烦。
file.json:
[
{
"id": 124,
"tweet": "Hey its a beautiful day today!"
"user": "twitter_username101"
},
{
"id": 433,
"tweet": "The worst superbowl was this year's for sure, waste of my day",
"user": "username23"
}
]