// JsonArray creates a JSON array representing ToJsonner.
// The created object is written to the Buffer of b.
JsonArray creates a JSON array representing ToJsonner.
The created object is written to the Buffer of b.
// JsonArray creates a JSON array representing ToJsonner . // The created object is written to the Buffer of b .
func (b *ObjectBuilder) JsonArray(elements []ToJsonner) (int, error) {
	n, m := 0, 0
	var err error
	if m, err = b.Buffer.WriteString("["); err != nil {
		return n + m, err
	}
	n += m
	for i, elem := range elements {
		if i != 0 {
			if m, err = b.Buffer.WriteString(","); err != nil {
				return n + m, err
			}
			n += m
		}
		b.SetAddedItem(false)
		if m, err = elem.ToJson(b); err != nil {
			return n + m, err
		}
	}
	if m, err = b.WriteString("]"); err != nil {
		return n + m, err
	}
	n += m
	return n, nil
}
func ( b * ObjectBuilder ) JsonArray ( elements [ ] ToJsonner ) ( int , error ) { n , m := 0 , 0 var err error if m , err = b . Buffer . WriteString ( " " ) ; err != nil { return n + m , err } n += m for i , elem := range elements { if i != 0 { if m , err = b . Buffer . WriteString ( " " ) ; err != nil { return n + m , err } n += m } b . SetAddedItem ( false ) if m , err = elem . ToJson ( b ) ; err != nil { return n + m , err } } if m , err = b . WriteString ( " " ) ; err != nil { return n + m , err } n += m return n , nil }
JsonArray creates a JSON array representing ToJsonner.
JsonArray creates a JSON array representing ToJsonner .