[evolvis-commits] r17532: JSON decoder/tester, for papel

mirabilos at evolvis.org mirabilos at evolvis.org
Mon Sep 5 13:18:07 CEST 2011


Author: mirabilos
Date: 2011-09-05 13:18:07 +0200 (Mon, 05 Sep 2011)
New Revision: 17532

Added:
   trunk/gforge_base/evolvisforge/gforge/common/include/minijson-decode.php
Log:
JSON decoder/tester, for papel


Added: trunk/gforge_base/evolvisforge/gforge/common/include/minijson-decode.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/common/include/minijson-decode.php	                        (rev 0)
+++ trunk/gforge_base/evolvisforge/gforge/common/include/minijson-decode.php	2011-09-05 11:18:07 UTC (rev 17532)
@@ -0,0 +1,31 @@
+#!/usr/bin/env php
+<?php
+/**
+ * Minimal JSON decoding command line utility, for test purposes
+ *
+ * Copyright © 2011
+ *	Thorsten “mirabilos” Glaser <t.glaser at tarent.de>
+ * All rights reserved.
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+require 'minijson.php';
+$eingabe = file_get_contents('php://stdin');
+$resultat = '';
+$code = minijson_decode($eingabe, $resultat);
+print_r(array('eingabe' => $eingabe, 'code' => $code, 'resultat' => $resultat));
+echo "\n";


Property changes on: trunk/gforge_base/evolvisforge/gforge/common/include/minijson-decode.php
___________________________________________________________________
Added: svn:executable
   + *



More information about the evolvis-commits mailing list