title: Create dynamic / runtime (and simple) bean from JSON String
body: <p>In what way can Java generate a Bean (not just a Map object)--a bean with fields, getters, and setters from a JSON String.</p>
  
  <p>Here's the code I am trying now using ByteBuddy (non-working code/error):</p>
  
  <pre><code>        Object contextObject = new ByteBuddy()
              .subclass(Object.class)
              .defineField("date", String.class, Modifier.PUBLIC)
              .defineMethod("getDate", Void.TYPE, Modifier.PUBLIC)
              .intercept(FieldAccessor.ofField("date"))
              .make()
              .load(getClass().getClassLoader(), ClassLoadingStrategy.Default.WRAPPER)
              .getLoaded()
              .newInstance();
          BeanUtils.setProperty(contextObject, "date", "August 1, 2017");
  </code></pre>
  
  <p>However, due to the "wired" natured for ByteBuddy, I am not sure how flexible it can be to generate a dynamic bean from JSON. </p>