trailblazer / representable

Maps representation documents from and to Ruby objects. Includes JSON, XML and YAML support, plain properties and compositions.
http://trailblazer.to/2.1/docs/representable.html
MIT License
689 stars 108 forks source link

Populator docs or examples? #228

Open mgraham opened 6 years ago

mgraham commented 6 years ago

I'm trying to parse a JSON document into an object graph that is quite different in structure.

I think populators are what I'm looking for, but there isn't any documentation for them.

Does somebody have any code that shows how populators work?

mgraham commented 6 years ago

I think I'm managing to figure it out from the tests. If I get it working, I'll try to make a PR with some basic docs.

apotonick commented 6 years ago

Hi Michael, we're slowly fading out Representable in favor or Transform, a new gem that is much simpler. So, your PRs are appreciated, but keep in mind the gem's going to be replaced "somewhere this year"™.

mgraham commented 6 years ago

Ok, noted - thanks!

(I'm assuming Transform isn't ready enough yet that I should start off with it instead of Representable for a new project...?)

apotonick commented 6 years ago

Yes, go with Representable and follow our Facebook page https://www.facebook.com/trailblazer.to - we're announcing new/old infos there!