Lines Matching refs:xv

106 func (xv Value) String(v string) {
107 escapeString(xv.w, v)
108 xv.Close()
113 func (xv Value) Byte(v int8) {
114 xv.Long(int64(v))
119 func (xv Value) Short(v int16) {
120 xv.Long(int64(v))
125 func (xv Value) Integer(v int32) {
126 xv.Long(int64(v))
131 func (xv Value) Long(v int64) {
132 *xv.scratch = strconv.AppendInt((*xv.scratch)[:0], v, 10)
133 xv.w.Write(*xv.scratch)
135 xv.Close()
140 func (xv Value) Float(v float32) {
141 xv.float(float64(v), 32)
142 xv.Close()
147 func (xv Value) Double(v float64) {
148 xv.float(v, 64)
149 xv.Close()
152 func (xv Value) float(v float64, bits int) {
153 *xv.scratch = encoding.EncodeFloat((*xv.scratch)[:0], v, bits)
154 xv.w.Write(*xv.scratch)
159 func (xv Value) Boolean(v bool) {
160 *xv.scratch = strconv.AppendBool((*xv.scratch)[:0], v)
161 xv.w.Write(*xv.scratch)
163 xv.Close()
168 func (xv Value) Base64EncodeBytes(v []byte) {
169 encodeByteSlice(xv.w, (*xv.scratch)[:0], v)
170 xv.Close()
175 func (xv Value) BigInteger(v *big.Int) {
176 xv.w.Write([]byte(v.Text(10)))
177 xv.Close()
182 func (xv Value) BigDecimal(v *big.Float) {
184 xv.Long(i)
188 xv.w.Write([]byte(v.Text('e', -1)))
189 xv.Close()
195 func (xv Value) Write(v []byte, escapeXMLText bool) {
198 escapeText(xv.w, v)
201 xv.w.Write(v)
204 xv.Close()
212 func (xv Value) MemberElement(element StartElement) Value {
213 return newValue(xv.w, xv.scratch, element)
223 func (xv Value) FlattenedElement(element StartElement) Value {
224 v := newFlattenedValue(xv.w, xv.scratch, element)
233 func (xv Value) Array() *Array {
234 return newArray(xv.w, xv.scratch, arrayMemberWrapper, xv.startElement, xv.isFlattened)
244 func (xv Value) ArrayWithCustomName(element StartElement) *Array {
245 return newArray(xv.w, xv.scratch, element, xv.startElement, xv.isFlattened)
255 func (xv Value) Map() *Map {
257 if xv.isFlattened {
258 return newFlattenedMap(xv.w, xv.scratch, xv.startElement)
262 return newMap(xv.w, xv.scratch)
295 func (xv Value) IsFlattened() bool {
296 return xv.isFlattened
300 func (xv Value) Close() {
301 writeEndElement(xv.w, xv.startElement.End())