```ruby
if options && encoder = options[:encoder]
  map { |v| encoder.check_for_circular_references(v) { v.as_json options }}
else
  map { |v| v.as_json options }
end
```