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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:18:01+00:00 2026-05-29T08:18:01+00:00

I have recently started parsing JSON documents using SBJSON Parser, and I am able

  • 0

I have recently started parsing JSON documents using SBJSON Parser, and I am able to read JSON documents just fine. However I am unable to figure out how I am meant to write JSON using this library. Under the documentation

http://stig.github.com/json-framework/api/3.0/interfaceSBJsonStreamWriter.html

There is a class for writing JSON, but I cannot figure out how to use it. There are no tutorials in his documentation on how to use it, and I can’t find any tutorials online about using it.

As an example, I tried doing something like this

SBJsonStreamWriter *write = [[SBJsonStreamWriter alloc]init];
[write writeObjectOpen];
[write writeString:@"Testing"];
[write writeObjectClose];

But I don’t know how to print this out, and I need to be able to write JSON for my project as I will be updating JSON files, so need to understand how to write JSON.

As anyone used this library before to write? If so could you please show me a quick example of how it is done

Thanks in advance!

Note: I can’t use the in built JSON Parser released with new xCode as my app must be able to support phones from IOS 4+ and the new Parser won’t work on phones that do not have IOS 5 installed

EDIT

Example say I wanted to create a JSON file which consisted of an array of names e.g.

{
“name”:[
“Elliot Jacobs”,
“Paul”,
“Maria”,
“Richard”,
“Ana”
]
}

EDIT 2:

Example two

{
“HomeScreen”:{
“Title”:{
“Name”:”James Bond”,
“Number”:”07789 123 456″
}
}
}

  • 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-05-29T08:18:02+00:00Added an answer on May 29, 2026 at 8:18 am

    I’m not quite sure what you mean by ‘writing JSON’ so I assume that you need to construct a JSON-formatted string. Are you certain that you must use the stream writer? If not, here’s an example with strings:

    SBJsonWriter *writer = [[SBJsonWriter alloc] init];
    NSDictionary *command = [NSDictionary dictionaryWithObjectsAndKeys:
                                    @"string1", @"key1",
                                    @"string2", @"key2",
                                    nil];
    NSString *jsonCommand = [writer stringWithObject:command]; // this string will contain the JSON-encoded command NSDictionary
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently started using Vim as my text editor and am currently working
I have recently started using DocCheck for checking the validity of JavaDoc's in code
I have recently started using the Rackspace Cloudfiles CDN (Limelight), about which I have
I have recently started using the excellent Texter . I wanted to set up
I have recently started using PlayN for a hobby project and has now stumbled
I have recently started using R and am still getting used to its data
I have recently started using CAML.NET IntelliSense for SharePoint with Visual Studio 2008; which
I have recently started using Google Webmaster Tools . I was quite surprised to
I have recently started using SQLALCHEMY to query a my-sql database. I want to
I have recently started playing with databases, trying to teach myself using examples. I

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.