question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parsing Object containing multiple arrays

See original GitHub issue

Hi, I’m using eclipse. Having a problem parsing my object

this is my main object

@RealmClass
public class AlbumDetail extends RealmObject {

    private RealmList<gallery_details> gallery_details;
    private RealmList<AlbumDetailData> Data;
//...
}
@RealmClass
public class gallery_details extends RealmObject{
    @PrimaryKey
    private String gallery_id;
    private String imageCount;
@RealmClass
public class AlbumDetailData extends RealmObject {

        @PrimaryKey        
        private String imageId; 
        private String imageUrl;
    private String likesCount;
    private String commentCount;
    private String userId;
    private String like;
    private String like_id;
    private String delete;
//...
}
    realm.createOrUpdateAllFromJson(AlbumDetail.class, jsonString);

getting error of shema

io.realm.exceptions.RealmException: class com.pantera.data.AlbumDetail is not part of the schema for this Realm.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:22 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
cmelchiorcommented, May 27, 2016

Yes, but it needs to be public, like so:

class Reminder extends RealmObject{

    //The default constructor?
    public Reminder(){}

    Reminder(int id, String (...)){
        this.id = id;
    }
}
0reactions
Punpufcommented, May 27, 2016

Thank you so much, it’s now working !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parsing JSON with multiple arrays and showing results in HTML
Even if there are multiple arrays in a JSON you just need to use JSON.parse(jsonObject) method to transform the JSON into a javascript ......
Read more >
Parse json with multiple arrays - Power Platform Community
Hello experts,. I`m trying to parse JSON object from Power Automate to Powerapps. (Need to store JSON data in powerapps collection).
Read more >
JSON Array - Multi-dimensional Array in JSON - REST
JSON arrays can be of multiple data types. JSON array can store string , number , boolean , object or other array inside...
Read more >
JSON Array Literals - W3Schools
Arrays in JSON are almost the same as arrays in JavaScript. In JSON, array values must be of type string, number, object, array,...
Read more >
Creating a JSON String from JSON Object and JSON Arrays in ...
For clarification, The JSON body holds data from Maximo objects which will be sent to the ... Code 2 - Creating a JSON...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found