Jshn wiki page

The curl needs to be installed but the OpenWrt out of the box has uclient-fetch which is a stripped wget clone. So you can use:

  PRICES_JSON=$(wget -qO - "https://sahkotin.fi/prices?start=$date")
  exit_status=$?
  if [ $exit_status -ne 0 ]; then
     >&2 echo "error $exit_status"
     exit $exit_status
  fi
  json_load "$PRICES_JSON"

Everything else I put on the wiki page
https://openwrt.org/docs/guide-developer/jshn#parse_list_of_objects

Please review and comment.
I also created a separate topic to help with shell scripts Writing shell scripts support topic

1 Like