Comparison with previous snippet
- --- Previous Snippet
-
- +++ Current Snippet
-
- @@ -19,3 +19,3 @@
-
- "Food1 Temp": food1temp,
- -"Cook Name": [ cook, "foo" ]
- +"Cook Name": [ cook, "foo", ], # this is not 'valid JSON'
- }
- import json
-
- json_string = f'''{
- "Pit Target Temp": {pitTargettemp},
- "Fan % Output": {pitfan_output},
- "Food 1 Target": {food1targettemp},
- "Pit Temp": {pittemp},
- "Food1 Temp": {food1temp},
- "Cook Name": [ "{cook}", "foo" ]
- }'''
-
- json_value_1 = json.loads(json_string)
-
- json_value_2 = {
- "Pit Target Temp": pitTargettemp,
- "Fan % Output": pitfan_output,
- "Food 1 Target": food1targettemp,
- "Pit Temp": pittemp,
- "Food1 Temp": food1temp,
- "Cook Name": [ cook, "foo", ], # this is not 'valid JSON'
- }
-
- dump = json.dum(json_value_1) # or json_value_2, you choose