title: .txt write to .json file batch or php file needed
body: <p>i need and search for a result to convert my .txt file to a .json file with that format:</p>
  
  <pre><code>{
  "id":"12777475756802056",
  "typ":"Solo",
  "match":
      {
          "rank":"1",
          "playeruserid":"165496871657",
          "playername":"Example Name",
          "kills":"8",
          "points":"224000",
          "killer":"empty", // while firstplace
          "weapon":"empty" // while firstplace
      },
      {
          "rank":"2",
          "playeruserid":"654987654984",
          "playername":"Example Name 2",
          "kills":"4",
          "points":"168000",
          "killer":"Example Name",
          "weapon":"Shotgun"
      }
      ... another players here.
  }
  </code></pre>
  
  <p>and my .txt file looks so, yep really bad... with so many spaces and all in one line...: <a href="https://pastebin.com/FP0C9BCj" rel="nofollow noreferrer">https://pastebin.com/FP0C9BCj</a></p>
  
  <p>i try this batch to remove the many spaces:</p>
  
  <pre><code>@ECHO OFF
  SETLOCAL ENABLEDELAYEDEXPANSION 
  SET "sourcedir=D:\Users\Raphael\Desktop"
  SET "destdir=D:\Users\Raphael\Desktop"
  SET "filename1=%sourcedir%\matchreport.txt"
  SET "outfile=%destdir%\outfile.txt"
  (
  FOR /f "usebackqdelims=" %%a IN ("%filename1%") DO (
   SET "line=%%a"
   SET "line=!line:?=!"
   SET "line=!line:/=-!"
   SET "line=!line::=!"
   SET "line=!line: =;!"
   ECHO !line!
  )
  )&gt;"%outfile%"
  
  GOTO :EOF
  </code></pre>
  
  <p>and idk now why can convert this now to a json file, while all informations on one line pro player, and the json format is now:</p>
  
  <pre><code>{"1. 5605****11014 Cl***ma  205000 + 19000 ( 8) = 224000"}
  </code></pre>
  
  <p>and sorry this is my first try to convert a txt to a json file have u any idea to convert this? :/</p>