improved builder to create different view (xml, json)