private static ValueNode convertSimpleValueNode(ObjectNode objectNode, ValueNode valueNode) {
        //For numeric values, a minus sign can be specified.
        boolean negative = objectNode.get("minus") != null;
        
        if (valueNode == null) {
            //Null.
            return null;
        } else if (valueNode.getValueType() == SynValueType.STRING) {
            //String.
            return new StringValueNode(null, valueNode.getString());
        } else if (valueNode.getValueType() == SynValueType.INTEGER) {
            //Integer.
            long x = valueNode.getLong();
            if (negative) {
                x = -x;
            }
            return makeBasicIntegerNode(x); 
        } else if (valueNode.getValueType() == SynValueType.FLOAT) {
            //Floating-point.
            double x = valueNode.getFloat();
            if (negative) {
                x = -x;
            }
            return new FloatValueNode(null, x);
        } else if (valueNode.getValueType() == SynValueType.BOOLEAN) {
            //Boolean.
            return BooleanValueNode.getInstance(valueNode.getBoolean());
        } else if (valueNode.getValueType() == SynValueType.OBJECT) {
            //Arbitrary object.
            return new ObjectValueNode(valueNode.getValue());
        }
        
        throw new IllegalStateException("Invalid value type: " + valueNode.getValueType());
    }