mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Clean formatting and remove unneeded comments
This commit is contained in:
parent
0e01716827
commit
a843591136
1 changed files with 27 additions and 33 deletions
|
@ -500,22 +500,16 @@ sexp unparse_json (sexp ctx, sexp self, sexp obj){
|
|||
res = SEXP_NULL;
|
||||
|
||||
if( sexp_symbolp(obj) ) {
|
||||
// SYMBOL
|
||||
obj = sexp_symbol_to_string(ctx, obj);
|
||||
res = unparse_json_string(ctx, self, obj);
|
||||
} else if (sexp_stringp(obj)) {
|
||||
// STRING
|
||||
res = unparse_json_string(ctx, self, obj);
|
||||
} else if (sexp_listp(ctx, obj) == SEXP_TRUE) {
|
||||
// OBJECT
|
||||
res = unparse_json_object(ctx, self, obj);
|
||||
} else if (sexp_vectorp(obj)) {
|
||||
// ARRAY
|
||||
res = unparse_json_array(ctx, self, obj);
|
||||
} else if(sexp_fixnump(obj)) {
|
||||
res = unparse_json_fixnum(ctx, self, obj);
|
||||
} else if (sexp_numberp(obj)){
|
||||
// FLONUM or RATIONAL
|
||||
} else if (obj == SEXP_FALSE) {
|
||||
res = sexp_c_string(ctx, "false", -1);
|
||||
} else if (obj == SEXP_TRUE) {
|
||||
|
|
Loading…
Add table
Reference in a new issue