json.lua

A lightweight JSON library for Lua

json.lua-master.zip

Features

  • Implemented in pure Lua: works with 5.1, 5.2, 5.3 and JIT
  • Fast: generally outperforms other pure Lua JSON implementations (benchmark scripts)
  • Tiny: around 290sloc, 9kb
  • Proper error messages, eg: expected '}' or ',' at line 203 col 30

Usage

The json.lua file should be dropped into an existing project and required by it:

json = require "json"

The library provides the following functions:

json.encode(value)

Returns a string representing value encoded in JSON.

json.encode({ 1, 2, 3, { x = 10 } }) -- Returns '[1,2,3,{"x":10}]'

json.decode(str)

Returns a value representing the decoded JSON string.

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

json.decode('[1,2,3,{"x":10}]') -- Returns { 1, 2, 3, { x = 10 } }

Notes

  • Trying to encode values which are unrepresentable in JSON will never result in type conversion or other magic: sparse arrays, tables with mixed key types or invalid numbers (NaN, -inf, inf) will raise an error
  • null values contained within an array or object are converted to nil and are therefore lost upon decoding
  • Pretty encoding is not supported, json.encode() only encodes to a compact format

License

This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.

 

 

[출처] https://github.com/rxi/json.lua

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
51 블록체인과 유니티3d : Coding your own blockchain with Unity3D file 졸리운_곰 2019.02.22 536
50 DEP10401 : Cordova Simulate에서 앱을 실행하려면 Google Chrome이 필요합니다. 하지만 이 컴퓨터에 Chrome이 설치되어 있지 않습니다. https://www.google.com/chrome/browser/index.html에서 Chrome을 설치하세요. file 졸리운_곰 2019.01.30 441
49 Cordova 프로젝트 진행하기 (Hello World) file 졸리운_곰 2019.01.20 345
48 Cordova 개발환경 구성하기 (for Window) file 졸리운_곰 2019.01.20 568
47 자마린 (xamarin) firebase 졸리운_곰 2019.01.04 329
46 business-app-sample file 졸리운_곰 2018.09.06 516
» A lightweight JSON library for Lua file 졸리운_곰 2018.04.09 379
44 Using PHP and MySQL with Ionic file 졸리운_곰 2017.11.24 782
43 모바일 앱 제작 시 꼭 알아야 할 전략│Localization file 졸리운_곰 2017.10.24 531
42 Re-Architecting a Firebase app to work with Node.js and MongoDB file 졸리운_곰 2017.10.19 530
41 IT 서비스 스토리보드 (와이어프레임) 샘플 file 졸리운_곰 2017.10.10 2854
40 모바일앱 스토리 보드 샘플 file 졸리운_곰 2017.10.10 540
39 스타트업과 앱 기획을 위한 UI Sketch Sheet file 졸리운_곰 2017.10.10 984
38 Minecraft : multicaft server 로그인시 500 database 에러시 file 졸리운_곰 2017.09.10 583
37 플래시 게임을 대체할 HTML5 게임 엔진 순위 file 졸리운_곰 2017.07.22 415
36 Reflection of Unity C# file 졸리운_곰 2017.06.25 628
35 [유니티 C# 기초 강의] 12. 델리게이트 file 졸리운_곰 2017.06.25 398
34 [3D 수학] 사원수(Quaternion : 쿼터니언) file 가을의곰 2017.06.10 835
33 각도와 거리로 좌표 구하기 file 가을의곰 2017.06.10 1330
32 [OpenGL]Quaternion (사원수)를 이용한 회전 가을의곰 2017.06.10 785
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED