You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by "James Bognar (Jira)" <ji...@apache.org> on 2022/06/24 17:25:00 UTC
[jira] [Closed] (JUNEAU-224) Add @Parse and @Serialize annotations.
[ https://issues.apache.org/jira/browse/JUNEAU-224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Bognar closed JUNEAU-224.
-------------------------------
Resolution: Fixed
Implemented in 9.0.0
> Add @Parse and @Serialize annotations.
> --------------------------------------
>
> Key: JUNEAU-224
> URL: https://issues.apache.org/jira/browse/JUNEAU-224
> Project: Juneau
> Issue Type: Improvement
> Components: Code
> Affects Versions: 8.1.3
> Reporter: James Bognar
> Priority: Major
>
> Add annotations that explicitly specify which methods/constructors to use when transforming POJOs into serialized/parsed form.
> {code:java}
> // Use this method when serializing this POJO.
> @Serialize
> public String[] asStringArray() {...}
> // Use this method when serializing this POJO for JSON only.
> @Serialize(mediaType="*/json")
> public String[] asStringArray() {...}
> // Use this method when creating new Foo objects.
> @Parse
> public static Foo create(String[] in) {...}
> // Use this constructor when creating new Foo objects.
> @Parse
> public Foo(String[] in) {...}
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)