Describe the bug
Using API Ninjas the JSON response is not being parsed by Streamer Bot and is instead throwing an error.
[2024-05-01 06:40:50.216 ERR] Unable to parse result as json, falling back to auto typing [{"fact": "Cows do not have any upper front teeth. Instead they have a thick pad on the top jaw"}] Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray. Path '', line 1, position 1. at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings) at _3i0Lzx2wqGliKlNC7CtMlJ3XEbJ._7FLWL4s233ypQDlEhdJDrtFUCrh.MoveNext()
To Reproduce
Steps to reproduce the behavior:
Create new action
Create trigger
Create sub action to fetch URL and configure it for API ninjas (https://api-ninjas.com/api/dadjokes) will need account setting the parse JSON option
See error
Expected behavior
It should parse the JSON and allow us to use the generated variables to access the data.
Desktop (please complete the following information):
OS: Windows 10
Version 0.2.3
Additional context
It seems because it is returning as an array vs dictionary at the start that Streamerbot is having a challenge parsing the data.
Describe the bug Using API Ninjas the JSON response is not being parsed by Streamer Bot and is instead throwing an error.
[2024-05-01 06:40:50.216 ERR] Unable to parse result as json, falling back to auto typing [{"fact": "Cows do not have any upper front teeth. Instead they have a thick pad on the top jaw"}] Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray. Path '', line 1, position 1. at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings) at _3i0Lzx2wqGliKlNC7CtMlJ3XEbJ._7FLWL4s233ypQDlEhdJDrtFUCrh.MoveNext()
To Reproduce Steps to reproduce the behavior:
Expected behavior It should parse the JSON and allow us to use the generated variables to access the data.
Desktop (please complete the following information):
Additional context It seems because it is returning as an array vs dictionary at the start that Streamerbot is having a challenge parsing the data.