Package flexjson.factories

Examples of flexjson.factories.ClassLocatorObjectFactory


    public T deserializeInto( Reader input, String path, T target ) {
        return deserialize( input, path, new ExistingObjectFactory(target) );
    }

    public JSONDeserializer<T> use( String path, ClassLocator locator ) {
        pathFactories.put( Path.parse(path), new ClassLocatorObjectFactory( locator ) );
        return this;
    }
View Full Code Here


        map.put("home", home );
        map.put("work", work );

        map.put("phones", createPhoneMap(phones) );

        ObjectBinder binder = new ObjectBinder().use(Path.parse("phones.values"), new ClassLocatorObjectFactory( new StaticClassLocator(Phone.class) ) );
        Person person = (Person)binder.bind( map );

        assertTrue( "Make sure our array has stuff in it.", !person.getPhones().isEmpty() );
        assertEquals( 3, person.getPhones().size() );
        for( int i = 0; i < phones.size(); i++ ) {
View Full Code Here

    return deserialize(input, new ExistingObjectFactory(target));
  }

  public JSONDeserializer<T> use(String path, ClassLocator locator)
  {
    pathFactories.put(Path.parse(path), new ClassLocatorObjectFactory(locator));
    return this;
  }
View Full Code Here

TOP

Related Classes of flexjson.factories.ClassLocatorObjectFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.