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

  • Home
  • SEARCH
  • 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 8867509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:03:08+00:00 2026-06-14T17:03:08+00:00

I want to store the following string in a String variable {Id:123,DateOfRegistration:2012-10-21T00:00:00+05:30,Status:0} This is

  • 0

I want to store the following string in a String variable

{“Id”:”123″,”DateOfRegistration”:”2012-10-21T00:00:00+05:30″,”Status”:0}

This is the code I use ..

String str="{"Id":"123","DateOfRegistration":"2012-10-21T00:00:00+05:30","Status":0}";

.. but it’s showing error ..

  • 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-14T17:03:09+00:00Added an answer on June 14, 2026 at 5:03 pm

    You have to do this

    String str="{\"Id\":\"123\",\"DateOfRegistration\":\"2012-10-21T00:00:00+05:30\",\"Status\":0}";
    

    Please see this for reference
    Also from msdn 🙂

    Short Notation  UTF-16 character    Description
    \'  \u0027  allow to enter a ' in a character literal, e.g. '\''
    \"  \u0022  allow to enter a " in a string literal, e.g. "this is the double quote (\") character"
    \\  \u005c  allow to enter a \ character in a character or string literal, e.g. '\\' or "this is the backslash (\\) character"
    \0  \u0000  allow to enter the character with code 0
    \a  \u0007  alarm (usually the HW beep)
    \b  \u0008  back-space
    \f  \u000c  form-feed (next page)
    \n  \u000a  line-feed (next line)
    \r  \u000d  carriage-return (move to the beginning of the line)
    \t  \u0009  (horizontal-) tab
    \v  \u000b  vertical-tab
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to store each Datatable Column in a string variable so that i
How can I split the following string in C#? 11213,334990829,2234, I want to store
I want to store a number with the following 0.000 which is the best
I have a variable which contains a space-delimited string: line=1 1.50 string I want
The following code should store a key and a value. At the end, I
I have a Server side variable by the following code Dim mgps As New
In java how to use class variables in methods? this is the code that
In the following code : #include <iostream> #include <fstream> #include <string> using namespace std;
I want to: select all attributes foo, which are string values, and store the
I have the following MySQL query, which produces the result I want: SELECT `l`.`status`,

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.