After unpacking the AppAssets.zip
within the LoveLive! School Idol Festival package, even decoding them cannot make some of the .json
files directly readable by normal text editors or normal programs, this is because KLab uses a proprietary binary format to encode json.
The purpose of this project, is to restore the binary JSON to its orignal text format.
The program now take the name of the binary (or normal) JSON file as its only argument, and split normal JSON text to console's standard output. If the input file is a normal JSON file, this program will just beautify it.
Example:
$ jbcc-dump example.json
I wrote and compile this program using Microsoft Visual Studio 2015, and have successfully compiled using GCC and CLANG on Ubuntu. Since this program taking advantage of no more than some STL facilities, it should compile and run with no problem on any other platform.
If you are running on a Linux or other Unix like system, or you have the GCC or CLANG and make toolchain installed, simply try:
$ make
And you can locate the compiled binary in bin/
folder.
The difference between KLab's YAJL and the original one is that, it
Added code to check the first bytes of the stream to decode and decide to switch to other parser that perform the same callback to user code as YAJL, as an end result, we can send different stream formats but the user parser implementing the callbacks from YAJL will stay the same.
as stated in this document.
This program make use of the KLab modified version of YAJL (Yet Another JSON Library). I personally refer to KLab's original code and the YAJL's original reformat program example to understand how the YAJL library works.