2013/07/21

Publish public bookmark 07/21/2013

      • JSON's basic types are:

         
           
        • Number (double precision floating-point format in JavaScript, generally depends on implementation)
        •  
        • String (double-quoted Unicode, with backslash escaping)
        •  
        • Boolean (true or false)
        •  
        • Array (an ordered sequence of values, comma-separated and enclosed in square brackets; the values do not need to be of the same type)
        •  
        • Object (an unordered collection of key:value pairs with the ':' character separating the key and the value, comma-separated and enclosed in curly braces; the keys must be strings and should be distinct from each other)
        •  
        • null (empty)
    • Use an External Editor in the mongo Shell

       
       

      New in version 2.2.

       
       

      In the mongo shell you can use the edit operation to edit a function or variable in an external editor. The edit operation uses the value of your environments EDITOR variable.

       

      At your system prompt you can define the EDITOR variable and start mongo with the following two operations:

       
      export EDITOR=vim mongo 
       
       

      Then, consider the following example shell session:

       
      MongoDB shell version: 2.2.0 > function f() {} > edit f > f function f() {     print("this really works"); } > f() this really works > o = {} { } > edit o > o { "soDoes" : "this" } >

Posted from Diigo. The rest of my favorite links are here.

No comments:

Post a Comment