Switch to using the type checking decode_json

To avoid the problem of user file modification
into json of a non-dictionary type we should use
the decode_json helper that checks the root elements
type to help protect against these types of misuse.

Change-Id: I85889eaeee90650bc9b33f7e9ef7424eab8750b2
Merge "Switch to using the type checking decode_json"