code: public final IJSONSerializable<?> fromJSON(final JSONObject json, final ValidationContext ctx) throws ValidationException
      {
          if (null == json)
          {
              return null;
          }
          String type = null;
  
          IFactory<?> factory = null;
  
          final JSONValue tval = json.get("type");
  
          ctx.push("type");
  
          if (null == tval)
          {
              ctx.addRequiredError();
          }
          else
          {
              final JSONString styp = tval.isString();
  
              if (null == styp)
              {
                  ctx.addBadTypeError("String");
              }
              else
              {
                  type = styp.stringValue();
  
                  factory = LienzoCore.get().getFactory(type);
  
                  if (null == factory)
                  {
                      ctx.addMissingNodeFactoryError(type);
                  }
              }
          }
          ctx.pop(); // type
  
          if (null == factory)
          {
              return null;
          }
          else
          {
              if (ctx.isValidate())
              {
                  // we don't need to validate during a copy operation!
  
                  validateAttributes(json, factory, type, ctx);
              }
              if (factory.isPostProcessed())
              {
                  final IJSONSerializable<?> node = factory.create(json, ctx);
  
                  if (null != node)
                  {
                      factory.process(node, ctx);
                  }
                  return node;
              }
              else
              {
                  return factory.create(json, ctx);
              }
          }
      }
docs: Creates a IJSONSerializable from the JSONObject, using the ValidationContext.
  <p>
  You should only call this when you're writing your own node class
  and you're building a custom {@link IFactory}.
  
  @param json JSONObject
  @param ctx ValidationContext
  @return IJSONSerializable
  @throws ValidationException