Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

hide branches in brief mode

  • Loading branch information...
commit bef2e4e3bef9ca66ef24ef034a376e274de6d743 1 parent a22d669
Dominic Tarr authored March 14, 2013

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  JSON.sh
6  JSON.sh
@@ -40,7 +40,7 @@ parse_array () {
40 40
       done
41 41
       ;;
42 42
   esac
43  
-  [ $BRIEF -ne 1 ] && value=`printf '[%s]' "$ary"`
  43
+  [ $BRIEF -ne 1 ] && value=`printf '[%s]' "$ary"` || value=
44 44
 }
45 45
 
46 46
 parse_object () {
@@ -74,7 +74,7 @@ parse_object () {
74 74
       done
75 75
     ;;
76 76
   esac
77  
-  [ $BRIEF -ne 1 ] && value=`printf '{%s}' "$obj"`
  77
+  [ $BRIEF -ne 1 ] && value=`printf '{%s}' "$obj"` || value=
78 78
 }
79 79
 
80 80
 parse_value () {
@@ -86,7 +86,7 @@ parse_value () {
86 86
     ''|[!0-9]) throw "EXPECTED value GOT ${token:-EOF}" ;;
87 87
     *) value=$token ;;
88 88
   esac
89  
-  ! ([ $BRIEF -eq 1 ] && ([ -z $jpath ] || [ $value = '""' ])) \
  89
+  ! ([ $BRIEF -eq 1 ] && ([ -z $jpath ] || [ "$value" = '' ])) \
90 90
       && printf "[%s]\t%s\n" "$jpath" "$value"
91 91
 }
92 92
 

0 notes on commit bef2e4e

Please sign in to comment.
Something went wrong with that request. Please try again.