# Issues with juce var

**URL:** <https://forum.juce.com/t/issues-with-juce-var/44941>\
**Category:** General JUCE discussion\
**Created:** [March 11, 2021, 11:50am UTC](https://forum.juce.com/t/issues-with-juce-var/44941 "2021-03-11T11:50:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karota](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/karota/32/8238_2.png) [@karota](https://forum.juce.com/u/karota)\
**Post date:** [March 11, 2021, 11:50am UTC](https://forum.juce.com/t/issues-with-juce-var/44941/1 "2021-03-11T11:50:45Z")

</div>

Hi!

I’m trying to create a simple class with static methods to parse my JSON file. What I’d like to do is to declare a static juce::var, which is initialized by calling the juce::JSON::parse() method in the .cpp file.  
Then, I want to declare my static methods that call the static juce::var object and return a corresponding value based on the String that the method receives as input.

By doing this, I get an error in the destructor of juce::var. Am I wrong something? Is there a way to declare and initialize a static juce::var?
