Returning more complex object instead of JSON