Convert pattern from json string to dictionary