mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-24 14:15:49 +00:00
messing around with serialized types test
This commit is contained in:
@@ -153,7 +153,7 @@ SerializedObject.prototype.to_json = function() {
|
||||
|
||||
function jsonify_structure(thing, field_name) {
|
||||
var output;
|
||||
|
||||
console.log("JSONIFYING:", thing, field_name);
|
||||
switch (typeof thing) {
|
||||
case 'number':
|
||||
switch (field_name) {
|
||||
@@ -167,6 +167,9 @@ function jsonify_structure(thing, field_name) {
|
||||
output = TRANSACTION_TYPES[thing] || thing;
|
||||
break;
|
||||
default:
|
||||
if (typeof thing.to_json === 'function') {
|
||||
console.log("WE COULD HAVE DONE:", thing.to_json());
|
||||
}
|
||||
output = thing;
|
||||
}
|
||||
break;
|
||||
@@ -187,7 +190,7 @@ function jsonify_structure(thing, field_name) {
|
||||
default:
|
||||
output = thing;
|
||||
}
|
||||
|
||||
console.log("AND THE RESULT WAS:", output);
|
||||
return output;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user