nqloc / formatter

json-formatter, xml-formatter, css-formatter, sql-formatter

Home Page:https://nqloc.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tool for formating data (Json, Xml, CSS, SQL, ...)

Demo


  1. Json parser
  2. Xml parser
  3. Css parser
  4. Sql parser

Json parser

Input

{"name":"John", "age":31, "city":"New York"}

Output

{
    "name": "John",
    "age": 31,
    "city": "New York"
}

Xml parser

Input

<?xml version="1.0" encoding="UTF-8"?><note><to>Tove</to><from>Jani</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>

Output

<?xml version="1.0" encoding="UTF-8"?>
<note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
</note>

CSS parser

Input

h1 {background-color: green;}div {background-color: lightblue;}p {background-color: yellow;}

Output

h1 {
     background-color: green;
}
 div {
     background-color: lightblue;
}
 p {
     background-color: yellow;
}

SQL parser

Input

SELECT Count(*) AS DistinctCountries FROM(SELECT DISTINCT Country FROM Customers);

Output

SELECT Count(*) AS DistinctCountries
FROM 
    (SELECT DISTINCT Country
    FROM Customers);

Like my stuff?

Would you like to buy me a coffee or send me a tip? While it's not expected, I would really appreciate it.

Paypal Buy Me A Coffee

About

json-formatter, xml-formatter, css-formatter, sql-formatter

https://nqloc.github.io


Languages

Language:JavaScript 86.2%Language:HTML 13.8%