【发布时间】:2017-12-24 20:30:43
【问题描述】:
我正在使用 akka.http.scaladsl.model.HttpResponse、HttpEntity。
得到响应后,它的类型为 responseEntity 的格式(Content-type: 'application/json', {MyJSONHERE})。有没有办法可以从实体中提取我的 json。
我尝试了 entity.getDataBytes,它以 ByteString 格式给出实体的内容。我想正确读取 JSON 并解析它。有人可以指导我吗?
【问题讨论】:
标签: json scala akka httpresponse httpentity