; ------------------------------------------------------------------- ; ; json_delete.lisp ; ; Oct/17/2013 ; ; ------------------------------------------------------------------- (require :asdf) (pushnew "/usr/share/common-lisp/source/cl-json_0.5.0/" asdf:*central-registry* :test #'equal) (require :cl-json) ; (load "/var/www/data_base/common/common_lisp/file_io.lisp") ;(load "/var/www/data_base/common/common_lisp/text_manipulate.lisp") (load "/var/www/data_base/common/common_lisp/json_manipulate.lisp") ; ; ------------------------------------------------------------------- (format t "*** 開始 ***~%") (defvar file_json) (setf file_json (car *command-line-application-arguments*)) (setf key_in (cadr *command-line-application-arguments*)) (format t "~a~%" file_json) (format t "~a~%" key_in) (defvar str_json) (setf str_json (file_to_str file_json)) ; (setf alist_aa (with-input-from-string (s str_json) (json:decode-json s))) ; (alist_delete_proc alist_aa key_in) (to_json_file alist_aa file_json) ; (format t "*** 終了 ***~%") ; -------------------------------------------------------------------