Settings Explained
1. Output Style
The output style contains presets for various programming languages such as C#, Java, JavaScript & PHP. All the other settings are dependent upon this. You can select Custom if you want to customize the individual settings.
C# & Java
This is the setting for the C# & Java programming languages. The values for this preset are:-
Enclose Character " Escape Character \ Concatenate Character + Space before concatenate character Yes Start Character Empty End Character ; "{" + " \"name\": \"John Doe\"," + " \"age\": 69" + "}";
JavaScript
This is the setting for the JavaScript programming language. The values for this preset are:-
Enclose Character ' Escape Character \ Concatenate Character + Space before concatenate character Yes Start Character Empty End Character ; '{' . ' "name": "John Doe",' . ' "age": 69' . '}';
PHP
This is the setting for the PHP programming language. The values for this preset are:-
Enclose Character ' Escape Character \ Concatenate Character . Space before concatenate character Yes Start Character Empty End Character ; '{' . ' "name": "John Doe",' . ' "age": 69' . '}';
Custom
This allows you to customize the individual settings for the following:-
- Enclosing Character
- Escape Character
- Concatenate Character
- Space before concatenate character
- Start Character
- End Character
2. Enclose Character
This is the character with which strings on each line are surrounded. Typically, this is either double quote (") or single quote ('). Some languages such as PHP treat " differently in that variable substitutions are allowed. While in JavaScript, it is a matter of convenience as you can use whichever character (between " and ' that does not appear as a literal) as your string encloser.
3. Escape Character
If the enclosing character appears in the string, this character is used to escape it, thus making it a literal value. This is typically backslash (\) in most programming languages.
4. Concatenate Character
Each line of string is concatenated by this character. This is usually the plus (+) operator in most programming languages. In PHP it is the dot (.) operator
5. Start Character
In some languages such as C#, the first line of the string can start with special characters such as: @@ (verbatim string) or $ (format string)
6. End Character
This is the terminator at the very end of the last line of the output. Typically this is semi-colon (;) for languages modelled after C/C++
7. Space Before Concatenate Character
This can help improve readability by putting a space between the ending encloser for the string and the string concatenator.
History
- Oct 22, 2017
- Tool Launched
Comments 0