user50105: What I'm trying to achieve is very simple, I'm using ArduinoJson lib to load a JSON from SPIFFS and trying to inject the image values in an Array to feed the small Oled display of the ESP32:
// This is the format the library expects
static const unsigned char image[] U8X8_PROGMEM  = {
0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x17 }

This is the JSON File: 
   https://github.com/martinberlin/esp/blob/master/oled-128x64-xbm/data/1.json
The goal is to be able to generate little thumbnails after uploading an image for example, and display them in this Monochrome small display. 
The problem is to convert this Json array into the format the library expects. And I tried many different ways and readed about it, without finding the right way to do it. So I though to share this here as a challenge and see if someone is also interested to get dynamic image thumbnails working in this display.
This is my sketch: (Needs /data upload since json example is there)
https://github.com/martinberlin/esp/tree/master/oled-128x64-xbm
#include "FS.h"
#include "SPIFFS.h"
#include <U8g2lib.h>
#include <ArduinoJson.h>
#include <Wire.h>


/*
  U8glib Example Overview:
    Frame Buffer Examples: clearBuffer/sendBuffer. Fast, but may not work with all Arduino boards because of RAM consumption
    Page Buffer Examples: firstPage/nextPage. Less RAM usage, should work with all Arduino boards.
    U8x8 Text Only Example: No RAM usage, direct communication with display controller. No graphics, 8x8 Text only.

*/
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 15, /* data=*/ 4, /* reset=*/ 16);


static const unsigned char image[] U8X8_PROGMEM  = {
  0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x17, 
  0xFC, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 
  0xFF, 0xFF, 0xFF, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xF0, 0xFF, 0xFF, 
  0xFF, 0x7F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x14, 0xFD, 0xFF, 0xFF, 0xFF, 
  0x00, 0xF8, 0xFF, 0xFF, 0x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xFF, 0xFF, 
  0xFF, 0x79, 0x40, 0x18, 0x00, 0x1C, 0x9E, 0xFC, 0xFF, 0x03, 0xFF, 0xFF, 
  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1C, 0x00, 0x0C, 0x00, 0x0C, 0x4E, 0xFE, 
  0xFF, 0x33, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3C, 0x00, 0x06, 
  0x00, 0x0C, 0x77, 0xFF, 0xFF, 0x33, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
  0x7F, 0x7F, 0x00, 0x23, 0x00, 0xCE, 0xFF, 0xFF, 0xFF, 0x16, 0xF8, 0xFF, 
  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x85, 0x01, 0x00, 0x1E, 0xFE, 0xFF, 
  0x7F, 0x10, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x01, 
  0x80, 0x0F, 0xFF, 0xFF, 0x3F, 0x10, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
  0xFF, 0xFF, 0x67, 0x00, 0xD8, 0x1F, 0xFF, 0xFF, 0x7F, 0x10, 0xFE, 0xFF, 
  0xFF, 0xFF, 0xFF, 0xFF};

const char* xtemp[1024]; // Temporary array to store JSON incoming Hex as string
const unsigned char* xbm[1024] U8X8_PROGMEM;


void setup(void) {
  Serial.begin(115200);
  // Read xbm from  json
  SPIFFS.begin();

   if (SPIFFS.exists("/1.json")) {
    Serial.println("1.json found in SPIFFS");
    File configFile = SPIFFS.open("/1.json", FILE_READ);
      if (configFile) {
        size_t size = configFile.size();
        // Allocate a buffer to store contents of the file.
        std::unique_ptr<char[]> buf(new char[size]);

        configFile.readBytes(buf.get(), size);
        DynamicJsonBuffer jsonBuffer;
        JsonObject& json = jsonBuffer.parseObject(buf.get());
        //json.printTo(Serial);

        if (json.success()) {          
          Serial.println("json.success");
          JsonArray& arr = json["xbm"];

          // using C++11 syntax (preferred):
          int c=0;

          for (auto value : arr) {
            // Assign the json array to xtemp
            xtemp[c] = value.as<char*>(); 

            //Serial.println(String(c)+":"+value.as<char*>()); // Right value
            c++;      
          }

        } else {
          Serial.println("ERR load config");
        }

        configFile.close();
      }
   }
  u8g2.begin();
  u8g2.setDrawColor(0);
  u8g2.clearBuffer();

  Serial.println("cross_block_bits size:");
  Serial.print(sizeof(image));
  Serial.println(image[1]);

  //xbm = xtemp;

  Serial.println("xbm:");
  Serial.println(xtemp[1]);

 // Should be xbm (coming from json)   xbm
 // u8g2.drawXBM( 0, 0, 128, 64, xtemp); // Does not work since requires  'const uint8_t* {aka const unsigned char*} 
  u8g2.drawXBM( 0, 0, 128, 64, image);

  u8g2.sendBuffer();
}

void loop(void) {

}


user50105: Thanks and credits to Majenko. Sorted it out, still I don't know why addressing an existing image works but targeting a new array doesn't. Anyways as proof-of-concept that an XBM Icon can be loaded from JSON it works. For anyone wanting to achieve this, here is the code, make sure to upload some JSON to Spiffs first:
/*
  GraphicsTest.ino  
  Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/)
*/
#include "FS.h"
#include "SPIFFS.h"
#include <U8g2lib.h>
#include <ArduinoJson.h>
#include <Wire.h>


/*
  U8glib Example Overview:
    Frame Buffer Examples: clearBuffer/sendBuffer. Fast, but may not work with all Arduino boards because of RAM consumption
    Page Buffer Examples: firstPage/nextPage. Less RAM usage, should work with all Arduino boards.
    U8x8 Text Only Example: No RAM usage, direct communication with display controller. No graphics, 8x8 Text only.

*/
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 15, /* data=*/ 4, /* reset=*/ 16);


static unsigned char image[] U8X8_PROGMEM  = {
  0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x17, 
  0xFC, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x3F,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FF, 0xFF, 0x1F, 0x00, 0x60, 0x00, 0x08, 0xFC, 0xE6, 
  0xFF, 0xCD, 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0x1B, 0x00, 0x30, 
  0x00, 0x04, 0x3C, 0xF8, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
  0xFF, 0x79, 0x40, 0x18, 0x00, 0x1C, 0x9E, 0xFC, 0xFF, 0x03, 0xFF, 0xFF, 
  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1C, 0x00, 0x0C, 0x00, 0x0C, 0x4E, 0xFE, 
  0xFF, 0x33, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3C, 0x00, 0x06, 
  0x00, 0x0C, 0x77, 0xFF, 0xFF, 0x33, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
  0x7F, 0x7F, 0x00, 0x23, 0x00, 0xCE, 0xFF, 0xFF, 0xFF, 0x16, 0xF8, 0xFF, 
  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x85, 0x01, 0x00, 0x1E, 0xFE, 0xFF, 
  0x7F, 0x10, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x01, 
  0x80, 0x0F, 0xFF, 0xFF, 0x3F, 0x10, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
  0xFF, 0xFF, 0x67, 0x00, 0xD8, 0x1F, 0xFF, 0xFF, 0x7F, 0x10, 0xFE, 0xFF, 
  0xFF, 0xFF, 0xFF, 0xFF};

// Using this new array I could not get it work. Rewriting image works
long unsigned int xbm[1024];


void setup(void) {
  Serial.begin(115200);
  // Read xbm from  json
  SPIFFS.begin();

   if (SPIFFS.exists("/1.json")) {
    Serial.println("1.json found in SPIFFS");
    File configFile = SPIFFS.open("/2.json", FILE_READ);
      if (configFile) {
        size_t size = configFile.size();
        // Allocate a buffer to store contents of the file.
        std::unique_ptr<char[]> buf(new char[size]);

        configFile.readBytes(buf.get(), size);
        DynamicJsonBuffer jsonBuffer;
        JsonObject& json = jsonBuffer.parseObject(buf.get());
        //json.printTo(Serial);

        if (json.success()) {          
          Serial.println("json.success Size of xbm array");

          JsonArray& arr = json["xbm"];

        Serial.print(sizeof(arr));
          // using C++11 syntax (preferred):
          int c=0;
          const char* tempx;
          for (auto value : arr) {
            // Assign the json array to xtemp
            tempx = value.as<char*>();

            image[c] = strtol(tempx, NULL, 16);

              //Serial.print(strtol(tempx, NULL, 16)); //Thx. Majenko
              if (c<10) {
              Serial.print("i:");Serial.print(image[c]);Serial.print(" ");
              }
            c++;      
          }
          Serial.print("Final c count:"+String(c));


        } else {
          Serial.println("ERR loading JSON");
        }

        configFile.close();
      }
   }
  u8g2.begin();
  u8g2.setDrawColor(0);
  u8g2.clearBuffer();

  Serial.print("image size:");
  Serial.print(sizeof(image));Serial.println();  // Here is 4096 also 4 times bigger, if I use a new array (WHY?)
  // Send the JSON array to oled display
  u8g2.drawXBM( 0, 0, 128, 64, (const uint8_t *)image);
  u8g2.sendBuffer();
}

void loop(void) {

}



50105: <p>What I'm trying to achieve is very simple, I'm using ArduinoJson lib to load a JSON from SPIFFS and trying to inject the image values in an Array to feed the small Oled display of the ESP32:</p>

<pre><code>// This is the format the library expects
static const unsigned char image[] U8X8_PROGMEM  = {
0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x17 }
</code></pre>

<p>This is the JSON File: 
   <a href="https://github.com/martinberlin/esp/blob/master/oled-128x64-xbm/data/1.json" rel="nofollow noreferrer">https://github.com/martinberlin/esp/blob/master/oled-128x64-xbm/data/1.json</a></p>

<p>The goal is to be able to generate little thumbnails after uploading an image for example, and display them in this Monochrome small display. </p>

<p>The problem is to convert this Json array into the format the library expects. And I tried many different ways and readed about it, without finding the right way to do it. So I though to share this here as a challenge and see if someone is also interested to get dynamic image thumbnails working in this display.</p>

<p>This is my sketch: (Needs /data upload since json example is there)</p>

<p><a href="https://github.com/martinberlin/esp/tree/master/oled-128x64-xbm" rel="nofollow noreferrer">https://github.com/martinberlin/esp/tree/master/oled-128x64-xbm</a></p>

<pre><code>#include "FS.h"
#include "SPIFFS.h"
#include &lt;U8g2lib.h&gt;
#include &lt;ArduinoJson.h&gt;
#include &lt;Wire.h&gt;


/*
  U8glib Example Overview:
    Frame Buffer Examples: clearBuffer/sendBuffer. Fast, but may not work with all Arduino boards because of RAM consumption
    Page Buffer Examples: firstPage/nextPage. Less RAM usage, should work with all Arduino boards.
    U8x8 Text Only Example: No RAM usage, direct communication with display controller. No graphics, 8x8 Text only.

*/
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 15, /* data=*/ 4, /* reset=*/ 16);


static const unsigned char image[] U8X8_PROGMEM  = {
  0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x17, 
  0xFC, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 
  0xFF, 0xFF, 0xFF, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xF0, 0xFF, 0xFF, 
  0xFF, 0x7F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x14, 0xFD, 0xFF, 0xFF, 0xFF, 
  0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0x8F, 0xFF, 0x10, 
  0x7E, 0xFF, 0xFF, 0xFF, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 
  0xFE, 0x8F, 0xFF, 0x90, 0x7F, 0xFF, 0xFF, 0xFF, 0x00, 0xFE, 0xFF, 0xFF, 
  0xFF, 0xFF, 0x03, 0x00, 0xFC, 0x0F, 0xFF, 0x90, 0xFF, 0x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0xFF, 0xFF, 0x33, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
  0x7F, 0x7F, 0x00, 0x23, 0x00, 0xCE, 0xFF, 0xFF, 0xFF, 0x16, 0xF8, 0xFF, 
  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x85, 0x01, 0x00, 0x1E, 0xFE, 0xFF, 
  0x7F, 0x10, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x01, 
  0x80, 0x0F, 0xFF, 0xFF, 0x3F, 0x10, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
  0xFF, 0xFF, 0x67, 0x00, 0xD8, 0x1F, 0xFF, 0xFF, 0x7F, 0x10, 0xFE, 0xFF, 
  0xFF, 0xFF, 0xFF, 0xFF};

const char* xtemp[1024]; // Temporary array to store JSON incoming Hex as string
const unsigned char* xbm[1024] U8X8_PROGMEM;


void setup(void) {
  Serial.begin(115200);
  // Read xbm from  json
  SPIFFS.begin();

   if (SPIFFS.exists("/1.json")) {
    Serial.println("1.json found in SPIFFS");
    File configFile = SPIFFS.open("/1.json", FILE_READ);
      if (configFile) {
        size_t size = configFile.size();
        // Allocate a buffer to store contents of the file.
        std::unique_ptr&lt;char[]&gt; buf(new char[size]);

        configFile.readBytes(buf.get(), size);
        DynamicJsonBuffer jsonBuffer;
        JsonObject&amp; json = jsonBuffer.parseObject(buf.get());
        //json.printTo(Serial);

        if (json.success()) {          
          Serial.println("json.success");
          JsonArray&amp; arr = json["xbm"];

          // using C++11 syntax (preferred):
          int c=0;

          for (auto value : arr) {
            // Assign the json array to xtemp
            xtemp[c] = value.as&lt;char*&gt;(); 

            //Serial.println(String(c)+":"+value.as&lt;char*&gt;()); // Right value
            c++;      
          }

        } else {
          Serial.println("ERR load config");
        }

        configFile.close();
      }
   }
  u8g2.begin();
  u8g2.setDrawColor(0);
  u8g2.clearBuffer();

  Serial.println("cross_block_bits size:");
  Serial.print(sizeof(image));
  Serial.println(image[1]);

  //xbm = xtemp;

  Serial.println("xbm:");
  Serial.println(xtemp[1]);

 // Should be xbm (coming from json)   xbm
 // u8g2.drawXBM( 0, 0, 128, 64, xtemp); // Does not work since requires  'const uint8_t* {aka const unsigned char*} 
  u8g2.drawXBM( 0, 0, 128, 64, image);

  u8g2.sendBuffer();
}

void loop(void) {

}
</code></pre>
 50105: <p>Thanks and credits to Majenko. Sorted it out, still I don't know why addressing an existing image works but targeting a new array doesn't. Anyways as proof-of-concept that an XBM Icon can be loaded from JSON it works. For anyone wanting to achieve this, here is the code, make sure to upload <a href="https://github.com/martinberlin/esp/tree/master/oled-128x64-xbm/data" rel="nofollow noreferrer">some JSON to Spiffs</a> first:</p>

<pre><code>/*
  GraphicsTest.ino  
  Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/)
*/
#include "FS.h"
#include "SPIFFS.h"
#include &lt;U8g2lib.h&gt;
#include &lt;ArduinoJson.h&gt;
#include &lt;Wire.h&gt;


/*
  U8glib Example Overview:
    Frame Buffer Examples: clearBuffer/sendBuffer. Fast, but may not work with all Arduino boards because of RAM consumption
    Page Buffer Examples: firstPage/nextPage. Less RAM usage, should work with all Arduino boards.
    U8x8 Text Only Example: No RAM usage, direct communication with display controller. No graphics, 8x8 Text only.

*/
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 15, /* data=*/ 4, /* reset=*/ 16);


static unsigned char image[] U8X8_PROGMEM  = {
  0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x17, 
  0xFC, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 
  0xFF, 0xFF, 0xFF, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xF0, 0xFF, 0xFF, 
  0xFF, 0x7F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x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0x04, 0x3C, 0xF8, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
  0xFF, 0x79, 0x40, 0x18, 0x00, 0x1C, 0x9E, 0xFC, 0xFF, 0x03, 0xFF, 0xFF, 
  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1C, 0x00, 0x0C, 0x00, 0x0C, 0x4E, 0xFE, 
  0xFF, 0x33, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3C, 0x00, 0x06, 
  0x00, 0x0C, 0x77, 0xFF, 0xFF, 0x33, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
  0x7F, 0x7F, 0x00, 0x23, 0x00, 0xCE, 0xFF, 0xFF, 0xFF, 0x16, 0xF8, 0xFF, 
  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x85, 0x01, 0x00, 0x1E, 0xFE, 0xFF, 
  0x7F, 0x10, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x01, 
  0x80, 0x0F, 0xFF, 0xFF, 0x3F, 0x10, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
  0xFF, 0xFF, 0x67, 0x00, 0xD8, 0x1F, 0xFF, 0xFF, 0x7F, 0x10, 0xFE, 0xFF, 
  0xFF, 0xFF, 0xFF, 0xFF};

// Using this new array I could not get it work. Rewriting image works
long unsigned int xbm[1024];


void setup(void) {
  Serial.begin(115200);
  // Read xbm from  json
  SPIFFS.begin();

   if (SPIFFS.exists("/1.json")) {
    Serial.println("1.json found in SPIFFS");
    File configFile = SPIFFS.open("/2.json", FILE_READ);
      if (configFile) {
        size_t size = configFile.size();
        // Allocate a buffer to store contents of the file.
        std::unique_ptr&lt;char[]&gt; buf(new char[size]);

        configFile.readBytes(buf.get(), size);
        DynamicJsonBuffer jsonBuffer;
        JsonObject&amp; json = jsonBuffer.parseObject(buf.get());
        //json.printTo(Serial);

        if (json.success()) {          
          Serial.println("json.success Size of xbm array");

          JsonArray&amp; arr = json["xbm"];

        Serial.print(sizeof(arr));
          // using C++11 syntax (preferred):
          int c=0;
          const char* tempx;
          for (auto value : arr) {
            // Assign the json array to xtemp
            tempx = value.as&lt;char*&gt;();

            image[c] = strtol(tempx, NULL, 16);

              //Serial.print(strtol(tempx, NULL, 16)); //Thx. Majenko
              if (c&lt;10) {
              Serial.print("i:");Serial.print(image[c]);Serial.print(" ");
              }
            c++;      
          }
          Serial.print("Final c count:"+String(c));


        } else {
          Serial.println("ERR loading JSON");
        }

        configFile.close();
      }
   }
  u8g2.begin();
  u8g2.setDrawColor(0);
  u8g2.clearBuffer();

  Serial.print("image size:");
  Serial.print(sizeof(image));Serial.println();  // Here is 4096 also 4 times bigger, if I use a new array (WHY?)
  // Send the JSON array to oled display
  u8g2.drawXBM( 0, 0, 128, 64, (const uint8_t *)image);
  u8g2.sendBuffer();
}

void loop(void) {

}
</code></pre>

<p><a href="https://i.stack.imgur.com/QSc0J.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QSc0J.jpg" alt="XBM picture from Json: Proof of concept"></a></p>
