Skip to content

Conversation

thesadboy
Copy link
Contributor

As the readme file shows, add $key for all object, not only in array. The $key value support private ClassName start by _ .

@etoiledemer
Copy link

i like that 👍

@etoiledemer
Copy link

@mark-apn can we merge this?

@mark-nicepants
Copy link
Collaborator

Sorry for keeping you waiting. I'll take a look at this this week!

@mark-nicepants
Copy link
Collaborator

Question about this PR.

Why not just change the key in the json in the first place.

{
   "movie": {
      "id": 123
   }
}

Will generate a Movie class and by changing the key movie you change the key in the output.

Why do we need this:

{
   "movie": {
      "$key":  "film",
      "id": 123,
   }
}

When we can just do this.

{
   "film": {
      "id": 123
   }
}

@etoiledemer
Copy link

etoiledemer commented Jun 8, 2022

if I remember correctly it helps fixing this : #30
without having to use separate files;

(when we have two keys with same name, but with different properties, it avoid name clashes in generated files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants