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 8364037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:20:08+00:00 2026-06-09T12:20:08+00:00

NSData* jsonDataToSendTheServer; NSDictionary *setUser = [NSDictionary dictionaryWithObjectsAndKeys:[@u stringByAppendingString:my.id],@id, @GET_USER_INFO,@command, @,@value, nil]; NSLog(@%@, jsonDataToSendTheServer); Here

  • 0
NSData* jsonDataToSendTheServer;

NSDictionary *setUser = [NSDictionary
            dictionaryWithObjectsAndKeys:[@"u" stringByAppendingString:my.id],@"id",
                                        @"GET_USER_INFO",@"command",
                                        @"",@"value",
                                        nil];

 NSLog(@"%@", jsonDataToSendTheServer);

Here is my code. When I run above code I get this print

<7b226964 223a2275 35383738 37373334 31222c22 636f6d6d 616e6422 3a224745 545f5553 45525f49 4e464f22 2c227661 6c756522 3a22227d>

I don’t have any idea whether I can created a json or not.

How can I fix this?

  • 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-09T12:20:10+00:00Added an answer on June 9, 2026 at 12:20 pm

    You’re missing this line to convert it to json

    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:setUser 
                       options:NSJSONWritingPrettyPrinted error:&error];
    

    Here’s a tutorial on NSJSONSerialization that may help you:
    http://www.raywenderlich.com/5492/working-with-json-in-ios-5

    After that, you can convert the NSData to an NSString to print:

    Convert UTF-8 encoded NSData to NSString

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the code i am Trying NSData *imageData = [[NSData alloc]initWithData:UIImagePNGRepresentation(myImage.image)]; imageClass.imageString =
UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:imageURL]]]; I use the code above and then
Will [NSData dataWithContentsOfURL:url] either return the full amount of bytes on success, or nil
The following code: [[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:mapURL]] returns an instance of NSConcreteData as opposed to
I have a NSData object, i need to convert it a NSDictionary object. NSData
Possible Duplicate: NSData to UIImage How do I convert a NSData value to UIImage?
I'm trying to get values from nsdata class and doesn't work. here is my
While running this code: NSData *archivedSavedData = [[NSData alloc] init]; archivedSavedData = [defaults objectForKey:@listOfAccessNumbers];
I have code like this: NSData *data = [NSData dataWithContentsOfURL:objURL]; const void *buffer =
I'm using: NSData *output1 = [NSData dataWithContentsOfFile:@~/centralUtilOut.tmp]; NSString *output = [[NSString alloc]initWithData:output1 encoding:NSUTF8StringEncoding]; NSLog(@%@,

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.