title: Spring MVC send all model classes as json string
body: <p>I'm a noob to Spring MVC and JSON. I have a class hierarchy (interface, classes, subclasses) that I want to send across to my view and then resurrect the objects in the view (perhaps some Json library, currently using FlexJson).</p>
  
  <p>The idea behind this is I'm trying to generate a toolbox depending on the classes in my configuration hierarchy, allowing users to create a system by dragging and dropping (using jQuery?) the items (types from configuration hierarchy), setting various attributes (properties) on each of those items, and eventually saving and sending the configuration back to be persisted.</p>
  
  <p>So far...I've only got as far as harvesting the (sub)types (of objects) from the package using <a href="https://github.com/ronmamo/reflections" rel="nofollow">Reflections Library</a> as thus:</p>
  
  <pre><code>Reflections reflections = new Reflections( new ConfigurationBuilder()
              .setUrls( ClasspathHelper.forPackage( "com.obsm.myapp.model.configuration" ) )
              .setScanners( new SubTypesScanner(false) )
              .filterInputsBy( new FilterBuilder().includePackage( "com.obsm.myapp.model.configuration" ) ) );
      Set&lt;Class&lt;?&gt;&gt; types = reflections.getSubTypesOf( Object.class );
  </code></pre>
  
  <p>Any help is much appreciated.</p>