Getting JSON with Arduino Yun

Hey guys, I am trying to make a project that utilizes the data returned from this API https://stationstream.space/api/isssolar/latest using an Arduino Yun.

I am very new to Yun and coding for retrieving internet data, also it is in JSON format, so I think I need to add a JSON library. All the examples I found use sample data and don't actually get anything from the internet. I could use some guidance for retrieving the information in the first place.

So far I've been trying to use the HttpClient example but I really have no idea what I'm doing and could use some help. This code doesn't compile, but even if I get it to compile I'm pretty sure it won't work. I'm using the arduinoJSON library example for JSON parsing. Any help would be greatly appreciated.

#include <Bridge.h>
#include <HttpClient.h>
#include <ArduinoJson.h>

void setup() 
{
  HttpClient client;
  Serial.begin(9600);
  
  while (!Serial) {
    // wait serial port initialization
  }

  client.get("https://stationstream.space/api/isssolar/latest");
  StaticJsonBuffer<200> jsonBuffer;
  char json[] = client.read();
  JsonObject& root = jsonBuffer.parseObject(json);

  // Test if parsing succeeds.
  if (!root.success()) {
    Serial.println("parseObject() failed");
    return;
  }

  const char* a = root["status"];
  const char* b= root["voltage"];
  // Print values.
  Serial.println(a);
}

void loop() 
{
  
}

This code doesn't compile

Why not? What are the errors? Where did you get the libraries you are using?

but even if I get it to compile I'm pretty sure it won't work

That's a defeatest attitude. All MY code is perfect, until the crap doesn't work.

The error is "initializer fails to determine size of 'json'"

on this line "char json[] = client.read();"

Library is from GitHub - bblanchon/ArduinoJson: 📟 JSON library for Arduino and embedded C++. Simple and efficient.

That code is intended for the ARV side of the Yun.

BIN IT.

Any access to the internet is done from the linux side of the the yun and not the ARV side.

Mark