       result = result.substring(i+1, result.length-1) if i >= 0
     else
       result = typeof aValue
+      result =result.charAt(0).toUpperCase() + result.substring(1)
     result
   constructor: (aValue, aType, aOptions)->
     if not (aType instanceof Type)

    @$type.createValue aValue, aOptions
  clone: (aOptions) ->
    @create @valueOf(), aOptions
  toString: (aOptions)->
    String(@valueOf())
  valueOf: ->@value
  _toObject: (aOptions)->@valueOf()
  toObject: (aOptions)->
    result = @_toObject(aOptions)
    result
  toObjectInfo: (aOptions)->
    result = @toObject(aOptions)
    aOptions = {} unless aOptions
    aOptions.value = result
    @$type.toObject(aOptions)

  toJSON: (aOptions)->
    result = @toObject(aOptions)
    vType  = @$type
    if vType.valueToString
      if result.hasOwnProperty 'value'
        result.value = vType.valueToString result.value
      else
        result = vType.valueToString result
    result
  toJson: (aOptions)->
    result = @toJSON(aOptions)
