Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 06 2018 20:40
    facka commented #2
  • Sep 06 2018 18:41
    mohamedfar97 edited #2
  • Sep 06 2018 18:39
    mohamedfar97 opened #2
  • Jul 01 2015 04:19

    facka on master

    New version (compare)

  • Jul 01 2015 04:07

    facka on master

    Update README.md (compare)

  • Jun 23 2015 13:59

    facka on master

    Fix jsonParser issues and impro… Merge branch 'master' of https:… (compare)

  • Jun 19 2015 16:57

    facka on master

    Added Gitter badge Merge pull request #1 from gitt… (compare)

  • Jun 19 2015 16:57
    facka closed #1
  • Jun 19 2015 16:55
    gitter-badger opened #1
golokeshpatra45
@golokeshpatra45

This is my JSON -
[{
"app_site": "eventsubscribers",
"app_branch": "master",
"app_dbhash": false,
"app_env": "production",
"app_rev": "1.0.0.0",
"app_tar": "eventsubscribers-master-1.0.0.0.tar"
},
{
"app_site": "subscribers",
"app_branch": "master",
"app_dbhash": false,
"app_env": "production",
"app_rev": "1.0.0.0",
"app_tar": "subscribers-master-1.0.0.0.tar"
}]
This is my controller -

@RestController
     public class statusController {
@RequestMapping("/test")
public status getAllstatus() throws IOException, IllegalAccessException, Throwable, Exception{

    byte[] jsonData=Files.readAllBytes(Paths.get("C:/Users/patrag/workspace/com.json2rest/ver.json"));
    ObjectMapper objectMapper = new ObjectMapper();
    status stat1 = objectMapper.readValue(jsonData, status.class);

    return stat1;
}

}

Now I want both the app_sites followed by their respective app_tar in the browser. How should I proceed ? As of now returning the whole object gives me RAW JSON data as o/p but I dont want the complete JSON, only particular fields of objects and their respective values (i.e app_site followed by the app_tar).

I want to do the same to status.lightaria.com/lkg.latest
How can I do that
?