Added json read function.