implemented json encode for property