Added context to JsonEncoder