Skip to content

Instantly share code, notes, and snippets.

@collinvandyck
Created January 30, 2013 19:51
Show Gist options
  • Select an option

  • Save collinvandyck/4676215 to your computer and use it in GitHub Desktop.

Select an option

Save collinvandyck/4676215 to your computer and use it in GitHub Desktop.
class Foo {
Bar bar;
}
class Bar {
Collection<String> strings;
}
Is it possible to serialize Foo as:
{ "bar": ["a", "b", "c"] }
Instead of
{ "bar" : { "strings": ["a","b","c"] } }
@tatu-at-salesforce

Copy link
Copy Markdown

Use @jsonvalue on 'Collection strings;'

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