Copyright (c) 2015, Emir Pasic. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

package arraylist

import (
	
	
)

func () {
	var  containers.JSONSerializer = (*List)(nil)
	var  containers.JSONDeserializer = (*List)(nil)
}
ToJSON outputs the JSON representation of list's elements.
func ( *List) () ([]byte, error) {
	return json.Marshal(.elements[:.size])
}
FromJSON populates list's elements from the input JSON representation.
func ( *List) ( []byte) error {
	 := json.Unmarshal(, &.elements)
	if  == nil {
		.size = len(.elements)
	}
	return