Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to wrap a map in a bean/ round trip? #124

Closed
ghost opened this issue Feb 1, 2016 · 5 comments
Closed

How to wrap a map in a bean/ round trip? #124

ghost opened this issue Feb 1, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Feb 1, 2016

I have been kicking the tires on this project for a while.

This should be doable but I am wondering best way:
Make a Bean from Map?

{Also it be nice to go the other way.
Map m = toMap(Bean)
}

Cheers

@jodastephen
Copy link
Member

Take a look at FlexiBean. It may be what you want. You can use FlexiBean.putAll(Map) to set it up, and call toMap() to get the map back out.

@vicApakau
Copy link

That class is Final. I'm forced to wrap it.

@jodastephen
Copy link
Member

MapBean ? Its a wrapper around an exposed Map that makes it into a Bean.

@ghost
Copy link
Author

ghost commented Feb 3, 2016

No Same one, FlexiBean that you told me to use. I wrapped it.

I have no idea what the diference is btwn MapBea and FlexiBean even after
reading the docs.

(also thx for all the code donated, including Time lib)

On Wed, Feb 3, 2016 at 3:47 AM, Stephen Colebourne <notifications@github.com

wrote:

MapBean ? Its a wrapper around an exposed Map that makes it into a Bean.


Reply to this email directly or view it on GitHub
#124 (comment).

@jodastephen
Copy link
Member

MapBean is the thinnest wrapper around a Map to make it into a Bean. It fully exposes the internal storage map. FlexiBean is more complex, hiding the internal map, but still allowing map-like operations.

Anyway, hope Joda-Beans work out for you.

jodastephen added a commit that referenced this issue Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants