Skip to content

怎么返回json格式的数据 #19

Open

Description

@salomon1184

想用paoding-rose做app的rest 接口,请问怎么返回json格式的数据啊

Activity

  1. can-can commented on Jun 21, 2014

    @can-can

    Controller中方法的返回值写成JSONObject。或者直接用String返回json字符串,如

    return "@{\"a\":\"b\"}";
    return "@" + JSONObject.toJSONString
    
  2. bsqql123 commented on Aug 17, 2017

    @bsqql123

    如果rose直接封装一个注解,类似于spring 的@ResposeBody就好了 , @Qieqie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions