Json encoding reads from file