Json communications to ESP8266. Wifi Kills it

Hello All,
I’m a first timer and relatively new to Arduino. I have an Arduino mega talking to a NodeMCU 12e board using serial1 on the Arduino and softserial on the NodeMCU.
I configured JSON on both sides through subroutines and the communications is excellent. Now when I go to use the Wifi of the ESP8266 (NodeMCU) I get an invalid Json configuration on both the Arduino and NodeMCU sides. It is very reproducible I go from a working communications to no communications when I connect to Wifi.
I am baffled. Thoughts? The code for NodeMCU follows. And to emphasize commenting out ConnectToWifi in the setup() kills communications. Also, the Wifi connection still serves web pages but I can’t get current data via Json. To futher emphasize the Json exchange on the Arduino side also will fail when Wifi starts on the NodeMCU.
My undying thanks to all that can help

ESP8266 Code:

//Global Variables from Arduino to use in web page
bool EastDoor;
bool SouthDoor;
bool Slider;
bool GHDoor;
bool LRWin;
bool KitWin;
bool MBRWin;
bool DenWin;
bool HallWin;
bool BR2Win;
bool OfficeWin;
bool BR3Win;
bool NA1;
bool NA2;
bool NA3;
bool NA4;
bool DoorsSecure;
bool FirstFloorSecure;
bool SecondFloorSecure;
bool LROutlet;
bool KitOutlet;
bool MBROutlet;
bool DenOutlet;
bool BR2Outlet;
bool OfficeOutlet;
bool BR3Outlet;
bool GHFan;
bool ONA1;
bool ONA2;
float OfficeHumidity;
float OfficeTemp;
float BR2Humidity;
float BR2Temp;

// Load Wi-Fi library
#include <ESP8266WiFi.h>
#include <SoftwareSerial.h>
SoftwareSerial s(D6, D5);
#include <ArduinoJson.h>

// Replace with your network credentials
const char* ssid = "";
const char* password = "";

// Set web server port number to 80
WiFiServer server(80);

// Variable to store the HTTP request
String header;

void setup() {
// Initialize Serial port
Serial.begin(9600);
//Serial.println("setup");
s.begin(9600);
while (!Serial) continue;
ConnectWifi(); Comment this out and Json communications is flawless
}

void loop() {
JsonRxArduino();
JsonTxArduino();
}
void ConnectWifi()
{
// Connect to Wi-Fi network with SSID and password
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
// Print local IP address and start web server
Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
server.begin();
}

void JsonRxArduino()
{
StaticJsonBuffer<1500> jsonBuffer;
JsonObject& root = jsonBuffer.parseObject(s);
if (root == JsonObject::invalid())
{
Serial.println("Json object invalid");
return;
}

Serial.println("JSON received and parsed");
root.prettyPrintTo(Serial);

bool data1 = root["EastDoor"];
EastDoor = data1;
bool data2 = root["SouthDoor"];
SouthDoor = data2;
bool data3 = root["Slider"];
Slider = data3;
bool data4 = root["GHDoor"];
GHDoor = data4;
bool data5 = root["LRWin"];
LRWin = data5;
bool data6 = root["KitWin"];
KitWin = data6;
bool data7 = root["MBRWin"];
MBRWin = data7;
bool data8 = root["DenWin"];
DenWin = data8;
bool data9 = root["HallWin"];
HallWin = data9;
bool data10 = root["BR2Win"];
BR2Win = data10;
bool data11 = root["OfficeWin"];
OfficeWin = data11;
bool data12 = root["BR3Win"];
BR3Win = data12;
bool data13 = root["NA1"];
NA1 = data13;
bool data14 = root["NA2"];
NA2 = data14;
bool data15 = root["NA3"];
NA3 = data15;
bool data16 = root["NA4"];
NA4 = data16;
bool data17 = root["DoorsSecure"];
DoorsSecure = data17;
bool data18 = root["FirstFloorSecure"];
FirstFloorSecure = data18;
bool data19 = root["SecondFloorSecure"];
SecondFloorSecure = data19;
bool data20 = root["LROutlet"];
LROutlet = data20;
bool data21 = root["KitOutlet"];
KitOutlet = data21;
bool data22 = root["MBROutlet"];
MBROutlet = data22;
bool data23 = root["DenOutlet"];
DenOutlet = data23;
bool data24 = root["BR2Outlet"];
BR2Outlet = data24;
bool data25 = root["OfficeOutlet"];
OfficeOutlet = data25;
bool data26 = root["BR3Outlet"];
BR3Outlet = data26;
bool data27 = root["GHFan"];
GHFan = data27;
bool data28 = root["ONA1"];
ONA1 = data28;
bool data29 = root["ONA2"];
ONA2 = data29;
float data30 = root["OfficeHumidity"];
OfficeHumidity = data30;
float data31 = root["OfficeTemp"];
OfficeTemp = data31;
float data32 = root["BR2Humidity"];
BR2Humidity = data32;
float data33 = root["BR2Temp"];
BR2Temp = data33;

Serial.println("");
Serial.println("---------------------xxxxx--------------------");
}
void JsonTxArduino()
{
StaticJsonBuffer<1500> jsonToArduinoBuffer;
JsonObject& root = jsonToArduinoBuffer.createObject();
root["LROutletcmd"] = true;
root["LRHA"] = false;
root["KitOutletcmd"] = true;
root["KitHA"] = false;
root["MBROutletcmd"] = true;
root["MBRHA"] = false;
root["DenOutletcmd"] = true;
root["DenHA"] = false;
root["BR2Outletcmd"] = true;
root["BR2HA"] = false;
root["OfficeOutletcmd"] = true;
root["OfficeHA"] = false;
root["BR3Outletcmd"] = true;
root["BR3HA"] = false;
root["GHFancmd"] = true;
root["GHFanHA"] = false;
root["TemperatureUnits"] = true;

//root.printTo(Serial);
//Serial.println();
root.printTo(s);
}

ARDUINO CODE:
#include <ArduinoJson.h>

//Global Variables from ESP8266
//Commands for controlled outlets 1=On, 0=Off; 1=Auto, 0=Hand
bool LROutletcmd;
bool LRHA;
bool KitOutletcmd;
bool KitHA;
bool MBROutletcmd;
bool MBRHA;
bool DenOutletcmd;
bool DenHA;
bool BR2Outletcmd;
bool BR2HA;
bool OfficeOutletcmd;
bool OfficeHA;
bool BR3Outletcmd;
bool BR3HA;
bool GHFancmd;
bool GHFanHA;
bool TemperatureUnits;

void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}

void loop() {

{
JsonToWifi(); // Seed the transmit buffer to WIFI module
JsonFromWifi();
}
}
void JsonToWifi()
{
StaticJsonBuffer<1500> jsonBuffer;
JsonObject& root = jsonBuffer.createObject();
root["EastDoor"] = true;
root["SouthDoor"] = true;
root["Slider"] = true;
root["GHDoor"] = true;
root["LRWin"] = false;
root["KitWin"] = true;
root["MBRWin"] = true;
root["DenWin"] = true;
root["HallWin"] = true;
root["BR2Win"] = false;
root["OfficeWin"] = true;
root["BR3Win"] = false;
root["NA1"] = true;
root["NA2"] = false;
root["NA3"] = true;
root["NA4"] = false;
root["DoorsSecure"] = false;
root["FirstFloorSecure"] = true;
root["SecondFloorSecure"] = false;
root["LROutlet"] = true;
root["KitOutlet"] = false;
root["MBROutlet"] = true;
root["DenOutlet"] = false;
root["BR2Outlet"] = true;
root["OfficeOutlet"] = false;
root["BR3Outlet"] = true;
root["GHFan"] = false;
root["ONA1"] = false;
root["ONA2"] = false;
root["BR3Outlet"] = true;
root["OfficeHumidity"] = 60.4;
root["OfficeTemp"] = 76.4;
root["BR2Humidity"] = 39.8;
root["BR2Temp"] = 87.1;

//root.printTo(Serial);
root.printTo(Serial1);
}
void JsonFromWifi()
{
StaticJsonBuffer<1500> jsonToArduinoBuffer;
JsonObject& root = jsonToArduinoBuffer.parseObject(Serial1);
if (root == JsonObject::invalid())
{
Serial.println("Recieve invalid");
return;
}

Serial.println("JSON received and parsed");
root.prettyPrintTo(Serial);
bool data1=root["LROutletcmd"];
LROutletcmd=data1;
bool data2=root["LRHA"];
LRHA=data2;
bool data3=root["KitOutletcmd"];
KitOutletcmd=data3;
bool data4=root["KitHA"];
KitHA=data4;
bool data5=root["MBROutletcmd"];
MBROutletcmd=data5;
bool data6=root["MBRHA"];
MBRHA=data6;
bool data7=root["DenOutletcmd"];
DenOutletcmd=data7;
bool data8=root["DenHA"];
DenHA=data8;
bool data9=root["BR2Outletcmd"];
BR2Outletcmd=data9;
bool data10=root["BR2HA"];
BR2HA=data10;
bool data11=root["OfficeOutletcmd"];
OfficeOutletcmd=data11;
bool data12=root["OfficeHA"];
OfficeHA=data12;
bool data13=root["BR3Outletcmd"];
BR3Outletcmd=data13;
bool data14=root["BR3HA"];
BR3HA=data14;
bool data15=root["GHFancmd"];
GHFancmd=data15;
bool data16=root["GHFanHA"];
GHFanHA=data16;
bool data17=root["TemperatureUnits"];
TemperatureUnits=data17;

Serial.println("");
Serial.println("---------------------xxxxx--------------------");
}