Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8592243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:42:32+00:00 2026-06-11T23:42:32+00:00

I have a app of google app engine for for java and it have

  • 0

I have a app of google app engine for for java and it have a facebook form which on submitting send a signed_request to a servlet in our app. We are using following code to unencrypt and convert to a json string

String signedRequest = (String) req.getParameter("signed_request");
        String payload = signedRequest.split("[.]", 2)[1];
        payload = payload.replace("-", "+").replace("_", "/").trim();
        String jsonString = new String(Base64.decodeBase64(payload.getBytes()));
        System.out.println("Json is::" + jsonString);

The response looks like

[sakshumweb/3.361739372881481188].: Json is::{“algorithm”:”HMAC-SHA256″,”expires”:1347588000,”issued_at”:1347584290,”oauth_token”:”XXXXX”,”registration”:{“name”:”Vik Kumar”,”first_name”:”Vik”,”last_name”:”Kumar”,”bloodGroup”:”B-“,”gender”:”male”,”birthday”:”10/31/1983″,”email”:”vik.ceo\u0040gmail.com”,”cellPhone”:”1234123456″,”homePhone”:”1234123457″,”officePhone”:”1234123458″,”primaryAddress”:”jdfjfgj”,”area”:”jfdjdfj”,”location”:{“name”:”Redwood Shores, California”,”id”:103107903062719},”subscribe”:true,”eyePledge”:false,”reference”:”fgfgfgfg”},
“registration_metadata”:{“fields”:”[{\”name\”:\”name\”},{\”name\”:\”first_name\”},{\”name\”:\”last_name\”}, {\”name\”:\”bloodGroup\”, \”description\”:\”Blood Group\”, \”type\”:\”select\”, \”options\”:{\”A+\”:\”A+\”,\”A-\”:\”A-\”,\”B+\”:\”B+\”,\”B-\”:\”B-\”,\”O+\”:\”O+\”,\”O-\”:\”O-\”,\”AB+\”:\”AB+\”,\”AB-\”:\”AB-\”,\”A1+\”:\”A1+\”,\”A1-\”:\”A1-\”,\”A2+\”:\”A2+\”,\”A2-\”:\”A2-\”,\”A1B+\”:\”A1B+\”,\”A1B-\”:\”A1B-\”,\”A2B+\”:\”A2B+\”,\”A2B-\”:\”A2B-\”,\”HH\”:\”Bombay Blood Group\”}}, {\”name\”:\”gender\”}, {\”name\”:\”birthday\”},{\”name\”:\”email\”}, {\”name\”:\”cellPhone\”, \”description\”:\”Cell Number\”, \”type\”:\”text\”}, {\”name\”:\”homePhone\”, \”description\”:\”Home Number\”, \”type\”:\”text\”}, {\”name\”:\”officePhone\”, \”description\”:\”Office Number\”, \”type\”:\”text\”}, {\”name\”:\”primaryAddress\”, \”description\”:\”Primary Address\”, \”type\”:\”text\”}, {\”name\”:\”area\”, \”description\”:\”Locality/Village/Area\”, \”type\”:\”text\”},{\”name\”:\”location\”}, {\”name\”:\”subscribe\”, \”description\”:\”Subscribe me for the Sakshum activites updates.\”, \”type\”:\”checkbox\”, \”default\”:\”checked\”}, {\”name\”:\”eyePledge\”, \”description\”:\”I want to pledge my eyes as well.\”, \”type\”:\”checkbox\”}, {\”name\”:\”reference\”, \”description\”:\”How you reached to us (Friend, Facebook, google etc.)?\”, \”type\”:\”text\”}]”},”user”:{“country”:”us”,”locale”:”en_GB”},”user_id”:”875390603″}

So, how do i parse this data to extract the data in registration part of this response?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:42:33+00:00Added an answer on June 11, 2026 at 11:42 pm

    Since this is a valid JSON, you can use JSON library like Jackson or GSON to parse it.

    You can use this example code to print out all registration fields:

    JsonNode json = new ObjectMapper().readTree(response);
    JsonNode registration_fields = json.get("registration");
    
    Iterator<String> fieldNames = registration_fields.getFieldNames();
    while(fieldNames.hasNext()){
        String fieldName = fieldNames.next();
        String fieldValue = registration_fields.get(fieldName).asText();
        System.out.println(fieldName+" : "+fieldValue);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have our application hosted on Google app engine for Java and we have
I have a Java Google App Engine project which references a class in another
I have installed Quarcus using java in google app engine and php is working
I am developing a web app on google app engine using java.I have links
I have created a google-app-engine java project in Eclipse using Google's Eclipse plugin. My
I have a Google App Engine app using Java and Spring MVC 3.0. A
I have written a webservice in java based on Google App Engine, which stores
Hi I have th following Servlet in a new Google App Engine (SDK 1.6.6)
we have app hosted on google app engine for java. In this app we
I have a form in google app engine where I want to upload an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.