- /
- /
- /
Can you explain the syntax of the JSON string used to upload a WaveShaper filter (*.wsp) to the WaveShaper?
Here is a typical WaveShaper filter defined in JSON format.
{“type”:“wsp”,“wsp”:“190.950\t60.00\t0.00\t1\n190.951\t60.00\t0.00\t1\……… n196.474\t60.00\t0.00\t1\n”}
JSON Syntax: This includes characters like { , } , : , newlines, commas etc. This defines the structure of the JSON object, and serves the same role as they are typically found in programming languages like Java, C++, C# etc.
“Name”: Data saved in JSON objects follow a name/value pair convention. The name is a unique key corresponding to a particular piece of data. The name must be contained in quotes.
“Data”: This is where the data lives and it can be in several different forms: objects, arrays, numbers, strings, true, false and null. In particular, a string is encoded by enclosing a series of characters within a set of quotes.
You can learn more about the JSON format at http://www.json.org/.
Note that the \t and the \n are taking the place of the TAB and New Line characters of the standard wsp file.
“Frequency\TABAttenuation\TABPhase\TABPort\NEWLINEFrequency\TABAttenuation\TABPhase\TABPort\NEWLINE ….. Frequency\TABAttenuation\TABPhase\TABPort\NEWLINE“