Asjustments to Json and casting.