fix bug by reimplementing RDFJSON writer using the new Model API