From: <ha...@us...> - 2014-01-31 16:10:51
|
Revision: 19236 http://sourceforge.net/p/jmol/code/19236 Author: hansonr Date: 2014-01-31 16:10:46 +0000 (Fri, 31 Jan 2014) Log Message: ----------- getProperty("JSON") fix Modified Paths: -------------- trunk/Jmol/src/org/jmol/scriptext/ScriptExt.java Modified: trunk/Jmol/src/org/jmol/scriptext/ScriptExt.java =================================================================== --- trunk/Jmol/src/org/jmol/scriptext/ScriptExt.java 2014-01-30 22:39:17 UTC (rev 19235) +++ trunk/Jmol/src/org/jmol/scriptext/ScriptExt.java 2014-01-31 16:10:46 UTC (rev 19236) @@ -8042,7 +8042,7 @@ property = viewer.extractProperty(property, args, pt); if (isAtomProperty && property instanceof List) property = (((List<?>) property).size() > 0 ? ((List<?>) property).get(0) : ""); - return mp.addXObj(isJSON ? PT.toJSON(null, property) : + return mp.addXObj(isJSON ? "{" + PT.toJSON("value", property) + "}" : SV.isVariableType(property) ? property : Escape .toReadable(propertyName, property)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |