You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2015/03/15 20:23:38 UTC

[jira] [Created] (JOHNZON-40) support virtual objects

Romain Manni-Bucau created JOHNZON-40:
-----------------------------------------

             Summary: support virtual objects
                 Key: JOHNZON-40
                 URL: https://issues.apache.org/jira/browse/JOHNZON-40
             Project: Johnzon
          Issue Type: New Feature
            Reporter: Romain Manni-Bucau
             Fix For: 0.7-incubating


{code}
public static class FakeNestedObject {
        protected int a;
        protected int b;
        protected String[] c;
    }

    @JohnzonVirtualObjects({
            @JohnzonVirtualObject(
                    path = "nested",
                    fields = @JohnzonVirtualObject.Field("b")
            ),
            @JohnzonVirtualObject(
                    path = { "nested", "sub" },
                    fields = {
                            @JohnzonVirtualObject.Field("a"), @JohnzonVirtualObject.Field("c")
                    }
            )
    })
    public static class ChildOfFakedObject extends FakeNestedObject {
        protected List<String> children;
    }
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)