Cover
Vol. 17 No. 1 (2021)

Published: June 30, 2021

Pages: 29-37

Original Article

Encoding JSON by using Base64

Abstract

Transmitting binary data across a network should generally avoid transmitting raw binary data over the medium for several reasons, one would be that the medium may be a textual one and may not accept or correctly handle raw bitstream, another would be that some protocols may misinterpret the meaning of the bits and causes a problem or even loss of the data. To make the data more readable and would avoid misinterpretation by different systems and environments, this paper introduces encoding two of the most broadly used data interchange formats, XML and JSON, into the Base64 which is an encoding scheme that converts binary data to an ASCII string format by using a radix-64 representation. This process, will, make the data more readable and would avoid misinterpretation by different systems and environments. The results reflect that encoding data in Base64 before the transmission will present many advantages including readability and integrity, it will also enable us to transmit binary data over textual mediums, 7 Bit protocols such as SMTP, and different network hardware without risking misinterpretation.

References

  1. L. Irshad, L. Yan, and Z. Ma, “Schema-Based JSON Data Stores in Relational Databases,” J. Database Manag., vol. 30, no. 3, pp. 38–70, 2019.
  2. M. S. Marev, E. Compatangelo, and W. Vasconcelos, “Towards a context-dependent numerical data quality evaluation framework Technical Report,” arXiv, pp. 1–12, 2018.
  3. A. Olusola Olajide, Number System. Adekunle Ajasin University, 2017.
  4. S.R.Chaudhari, “Number Systems,” in Principles of Digital Electronics, 5th ed., Pune: licensed under a Creative Commons Attribution-NonCommercial- NoDerivatives 4.0 International License., 2019.
  5. A. Kelbert, “EMTF XML: New data interchange format and conversion tools for electromagnetic transfer functions,” Geophysics, vol. 85, no. 1, pp. F1–F17, 2020, doi: 10.1190/geo2018-0679.1.
  6. M. K. Yusof and M. Man, “Efficiency of JSON for data retrieval in big data,” Indones. J. Electr. Eng. Comput. Sci., vol. 7, no. 1, pp. 250–262, 2017, doi: 10.11591/ijeecs.v7.i1.pp250-262.
  7. Suha Mohammed Hadi, “A New Approach for Designing Multi Information Management System Using XML Technology,” Al-khwarizmi Eng. J. , vol. 1, no. 1, pp. 46–51, 2005.
  8. C. Späth, C. Mainka, V. Mladenov, and J. Schwenk, “Sok: XML parser vulnerabilities,” 10th USENIX Work. Offensive Technol. WOOT 2016, 2016.
  9. B. Li and J. Hu, “Analysis of the HTML to XML Conversion Method,” no. Isci, pp. 64–69, 2015, doi: 10.2991/isci-15.2015.10.
  10. M. Naseriparsa, C. Liu, M. S. Islam, and R. Zhou, “XPloreRank: exploring XML data via you may also like queries,” World Wide Web, vol. 22, no. 4, pp. 1727–1750, 2019, doi: 10.1007/s11280-018-0630-x.
  11. H. Bohring and O. Auer, “Mapping XML to OWL ontologies,” Lect. Notes Informatics (LNI), Proc. - Ser. Gesellschaft fur Inform., vol. P-72, pp. 147–156, 2005.
  12. Abdullah A. Abdullah, “Enhancing Cost and Security of Arabic SMS Messages over Mobile Phone Network,” AL-Rafidain J. Comput. Sci. Math., vol. 6, no. 3, pp. 111–127, 2009.
  13. H. Nurdiyanto, R. Rahim, and N. Wulan, “Symmetric Stream Cipher using Triple Transposition Key Method and Base64 Algorithm for Security Improvement,” J. Phys. Conf. Ser., vol. 930, no. 1, 2017, doi: 10.1088/1742- 6596/930/1/012005.
  14. L. Cantara, “METS: The Metadata Encoding and Transmission Standard,” Cat. Classif. Q., vol. 40, no. 3–4, pp. 237–253, Sep. 2005, doi: 10.1300/J104v40n03_11.
  15. A. M. Logunleko, K. B. Logunleko, and O. O. Lawal, “An End-to-End Secured Email System using Base64 Algorithm,” Int. J. Comput. Appl., vol. 175, no. 28, pp. 1–6, 2020, doi: 10.5120/ijca2020920669.
  16. G. J. Sussman and J. Sussman, “Structure and interpretation of computer programs, (second edition),” Comput. Math. with Appl., vol. 33, no. 4, p. 133, 1997, doi: 10.1016/s0898-1221(97)90051-1.
  17. D. Petković, “JSON Integration in Relational Database Systems,” Int. J. Comput. Appl., vol. 168, no. 5, pp. 14–19, 2017, doi: 10.5120/ijca2017914389.
  18. M. B. S. Narayana, H. Khalifa, and W. van der Aalst, “JXES: JSON support for the XES event log standard,” arXiv, no. i, 2020.
  19. Jiří Papoušek, “Traffic Flow Processing in JSON Format,” Spring, 2020.
  20. F. Pezoa, J. L. Reutter, F. Suarez, M. Ugarte, and D. Vrgoč, “Foundations of JSON Schema,” in Shaamood | 37 Proceedings of the 25th International Conference on World Wide Web, 2016, pp. 263–273, doi: 10.1145/2872427.2883029.
  21. Y. Li, N. R. Katsipoulakis, B. Chandramouli, J. Goldstein, and D. Kossmann, “Mison: A Fast JSON Parser for Data Analytics,” Proc. VLDB Endow., vol. 10, no. 10, pp. 1118–1129, Jun. 2017, doi: 10.14778/3115404.3115416.
  22. P. Bourhis, J. L. Reutter, F. Suárez, and D. Vrgoč, “JSON: Data Model, Query Languages and Schema Specification,” in Proceedings of the 36th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, 2017, pp. 123–135, doi: 10.1145/3034786.3056120.
  23. ECMA International, “The JSON Data Interchange Syntax,” Stand. ECMA-404, vol. 2nd Editio, no. December 2017, p. 8, 2017, [Online]. Available: http://www.ecma-international.org/publications/standards/Ecma-404.htm.
  24. M. T. Goodrich and R. Tamassia, Data Structures and Algorithms in Java. 2020.