default json encode of resources