src/Peach/DF/JsonCodec/Value.php
public function handle(Context $context)
    {
        $current = $context->current();
        if ($current === "-" || Number::checkDigit($context)) {
            $number = new Number();
            $number->handle($context);
            $this->result = $number->getResult();
            return;
        }
        switch ($current) {
            case "f":
                $this->decodeLiteral($context, "false", false);
                break;
            case "n":
                $this->decodeLiteral($context, "null", null);
                break;
            case "t":
                $this->decodeLiteral($context, "true", true);
                break;
            case "[":
                $array  = new ArrayExpr();
                $array->handle($context);
                $this->result = $array->getResult();
                break;
            case "{":
                $object = new ObjectExpr();
                $object->handle($context);
                $this->result = $object->getResult();
                break;
            case '"':
                $string = new StringExpr();
                $string->handle($context);
                $this->result = $string->getResult();
                break;
            default:
                throw $context->createException("Invalid value format");
        }
    }
public function handle(Context $context)
    {
        $current = $context->current();
        if ($current === "-" || Number::checkDigit($context)) {
            $number = new Number();
            $number->handle($context);
            $this->result = $number->getResult();
            return;
        }
        switch ($current) {
            case "f":
                $this->decodeLiteral($context, "false", false);
                break;
            case "n":
                $this->decodeLiteral($context, "null", null);
                break;
            case "t":
                $this->decodeLiteral($context, "true", true);
                break;
            case "[":
                $array  = new ArrayExpr();
                $array->handle($context);
                $this->result = $array->getResult();
                break;
            case "{":
                $object = new ObjectExpr();
                $object->handle($context);
                $this->result = $object->getResult();
                break;
            case '"':
                $string = new StringExpr();
                $string->handle($context);
                $this->result = $string->getResult();
                break;
            default:
                throw $context->createException("Invalid value format");
        }
    }
value の内容を解釈してその結果を $result に格納します.

<pre>
value = false / null / true / object / array / number / string
</pre>

@param  Context $context