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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:53:25+00:00 2026-06-15T12:53:25+00:00

JSON I recieve: 1: {days:1, name:Hans Sarpei} 2: {days:[1,2], name:Max Meier} Object Mapping: RKObjectMapping*

  • 0

JSON I recieve:

1:

{"days":1, "name":"Hans Sarpei"}

2:

{"days":[1,2], "name":"Max Meier"}

Object Mapping:

RKObjectMapping* map = [RKObjectMapping mappingForClass:[self class] ];
[map mapAttributes:@"name", @"days", nil];

Days:

@property(strong) NSArray *days;

If I recieve the second JSON-String, everything works fine. I have 1 and 2 in my days array.
But if i recieve the first JSON-String, my Array is empty.

I get the following Warning:

W restkit.object_mapping:RKObjectMappingOperation.m:239 Failed transformation of value at keyPath 'days'. No strategy for transforming from '__NSCFNumber' to 'NSArray'

Why cant Restkit handle this as an array and is there any workaround?

  • 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-15T12:53:25+00:00Added an answer on June 15, 2026 at 12:53 pm

    It is a bug in RestKit, will be fixed in some of the next version.

    https://github.com/RestKit/RestKit/issues/1046

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

Sidebar

Related Questions

For deserialising a json object, I had to define a parent class that would
I am trying to receive a json object back from php after sending data
JSON Parser Class public class JSONParser { static InputStream is = null; static JSONObject
the below code is the JSON response i recieve from an API. unfortunately i
I have a json object which I am trying to add to my highcharts
I expect to recieve a json containing a list of url-s by a jQuery.getJSON()
I want to return back html inside my json object however this does not
I got class (subclassed from QThread), that recieve data from server at many sockets
We receive JSON that looks like: { name: john, surname: smith, company: 1234342 }
I am able to recieve the json response from a tastypie rest service. the

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.