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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:13:41+00:00 2026-06-04T04:13:41+00:00

What are my options for serialising and deserializing NSOrderedSets to JSON? I’m using iOS5

  • 0

What are my options for serialising and deserializing NSOrderedSets to JSON? I’m using iOS5 / Objective-C. I guess I could roll my own, but I’m assuming there are some good existing frameworks out there…

  • 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-04T04:13:42+00:00Added an answer on June 4, 2026 at 4:13 am

    Your only option is probably, to get access on an OpenSource library and take a look at the code how the JSON Serializer is implemented. Then you could possibly extend the library for your purpose. By “extending” I mean, that you should utilize as much as possible from the existing library, since making your own serializer from scratch can be a lot of work.

    Usually, the JSON libraries define a mapping between the JSON types and the corresponding Objective-C types (classes). For instance, a JSON Array maps to a NSArray/NSMutableArray, a JSON Object maps to a NSDictionary/NSMutableDictionary, etc.

    The “JSON Serializer” would therefore “know” how to serialize a “mapped” Objective-C object into a JSON element. One way to implement this behavior is to add a Category to the mapped Objective-C class.

    So, when “extending the library” (depending on the library and the implementation), it may be sufficient to just add a Category for your custom classes and implement it accordingly.

    I’m an author of a JSON library. Creating Categories for custom classes which then can be used in the JSON Serializer wouldn’t be that much effort. You might specify your needs in an Enhancement request, so I could possibly adjust the library to make it more easy to add Custom classes.

    Your Category would look like as follows:

    @interface NSOrderedSet (JPJsonWriter) <JPJsonWriterInserterProtocol>
    @end
    
    @implementation NSOrderedSet (JPJsonWriter)
    
    - (int) JPJsonWriter_insertIntoBuffer:(NSMutableDataPushbackBuffer*)buffer 
                                 encoding:(JPUnicodeEncoding)encoding
                                  options:(JPJsonWriterOptions)options
                                    level:(NSUInteger)level
    {
        return insertJsonArray(self, buffer, encoding, options, level);
    }
    
    @end
    

    This is actually all what you have to do – after making a few adjustments to my library. But please note: this is dependent on the JSON library you are using. You can find my JSON library on here. Please file an enhancement request – thank you.

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

Sidebar

Related Questions

I have writen options to a <select> using something like Id.innerHTML = <option value='foo'>Foo</option>;
When using the Ajax.BeginForm() helper in ASP.Net MVC , I can pass options with
I am current storing all of my theme options individually using the update_option(name, value);
I tried using XmlSerializer, but XmlSerializer will not serialize a TimeSpan value; it just
compilation options for cmake (on windows) for ARM target system but when I run
Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} ^http://agilerent.com$ [NC] RewriteRule ^(.*)$ http://www.agilerent.com/$1 [R=301,L] this is
What options do you have to communicate between the WARs in an EAR? We
What options do I have to work around disabled cookies for session management?
What options exist for identifying the client name of a particular client from within
What options are there for localizing an app on Google App Engine? How do

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.