This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//load VDF data either from API call or fetching from file/url | |
//no matter your method, $json must contain the VDF data to be parsed | |
$json = file_get_contents("items_game.txt"); | |
//encapsulate in braces | |
$json = "{\n$json\n}"; | |
//replace open braces | |
$pattern = '/"([^"]*)"(\s*){/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
DefObj A-Z | |
Private Const MODULE_NAME As String = "mdJson" | |
'========================================================================= | |
' API | |
'========================================================================= | |
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) |