Menu

#40 Json subnest with ( ) needs colors

None
closed
nobody
json (1)
2023-02-23
2020-12-19
No

When using json some statements nest with ( ) as follows

db.inspections.insert(
{
"business_name" : "GROCERY INC.",
"date" : "Feb 20 2015",
"address" : {
"street": "MAIN",
"city": "COLUMBUS"
}
}).pretty()

It would be cool if the ( ) lit up the way the curly brackets do, but with another color.

Related

Tickets: #40

Discussion

  • Olivier Sessink

    Olivier Sessink - 2020-12-20

    can you send a larger piece of code that has all the possible uses of the curly brackets?
    (b.t.w. I suppose you are referring to the javascript syntax highlighting?)

     
  • Susan Cragin

    Susan Cragin - 2020-12-22
    <style type="text/css"><!-- DIV {margin:0px;} --></style>
    <style>body{font-size:10pt;font-family:arial,sans-serif;background-color:#ffffff;color:black;}p{margin:0px;}</style>
    I'm not sure about having an example that covers everything, but here's what I know. 

    Usually the outer set has parenthesis, then square brackets for a subset, and then curley brackets, which often have curley brackets within curley brackets. 

    Here are two samples.

    db.listingsAndReviews.aggregate([
                                      { "$match": { "amenities": "Wifi" } },
                                      { "$project": { "price": 1,
                                                      "address": 1,
                                                      "_id": 0 }}]).pretty()

    db.listingsAndReviews.aggregate([ { "$project": { "address": 1, "_id": 0 }},
                                      { "$group": { "_id": "$address.country" }}])

    HTH. 
    Susan

    -----Original Message-----
    From: Olivier Sessink <oli4@users.sourceforge.net>
    Sent: Dec 20, 2020 4:05 AM
    To: "[bluefish:tickets] " <40@tickets.bluefish.p.re.sourceforge.net>
    Subject: [bluefish:tickets] #40 Json subnest with ( ) needs colors

    can you send a larger piece of code that has all the possible uses of the curly brackets?
    (b.t.w. I suppose you are referring to the javascript syntax highlighting?)


    [tickets:#40] Json subnest with ( ) needs colors

    Status: open
    Milestone: 2.2.12
    Labels: json
    Created: Sat Dec 19, 2020 01:58 PM UTC by Susan Cragin
    Last Updated: Sat Dec 19, 2020 01:58 PM UTC
    Owner: nobody

    When using json some statements nest with ( ) as follows

    db.inspections.insert(
    {
    "business_name" : "GROCERY INC.",
    "date" : "Feb 20 2015",
    "address" : {
    "street": "MAIN",
    "city": "COLUMBUS"
    }
    }).pretty()

    It would be cool if the ( ) lit up the way the curly brackets do, but with another color.


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/bluefish/tickets/40/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

    <link itemprop="url" href="https://sourceforge.net/p/bluefish/tickets/40/"> <meta itemprop="name" content="View">
    <meta itemprop="description" content="View">
    </oli4@users.sourceforge.net>






     

    Related

    Tickets: #40

  • Olivier Sessink

    Olivier Sessink - 2020-12-23

    thanks. After looking at the syntax definition file, I think it is not possible to separate json from other square brackets. However, in the attached syntax definition file I made it possible to give each bracket (round, square and curly) a different color (the all default to the same style "brackets" but you can change that). Does that help you?

     
  • Susan Cragin

    Susan Cragin - 2020-12-23
    <style type="text/css"><!-- DIV {margin:0px;} --></style>
    <style>body{font-size:10pt;font-family:arial,sans-serif;background-color:#ffffff;color:black;}p{margin:0px;}</style><style type="text/css"><!-- DIV {margin:0px;} --></style>
    That will help a lot. Thank you.
    Susan Cragin

    -----Original Message-----
    From: Olivier Sessink <oli4@users.sourceforge.net>
    Sent: Dec 23, 2020 10:40 AM
    To: "[bluefish:tickets] " <40@tickets.bluefish.p.re.sourceforge.net>
    Subject: [bluefish:tickets] #40 Json subnest with ( ) needs colors

    thanks. After looking at the syntax definition file, I think it is not possible to separate json from other square brackets. However, in the attached syntax definition file I made it possible to give each bracket (round, square and curly) a different color (the all default to the same style "brackets" but you can change that). Does that help you?

    Attachments:


    [tickets:#40] Json subnest with ( ) needs colors

    Status: open
    Milestone: 2.2.12
    Labels: json
    Created: Sat Dec 19, 2020 01:58 PM UTC by Susan Cragin
    Last Updated: Sun Dec 20, 2020 09:05 AM UTC
    Owner: nobody

    When using json some statements nest with ( ) as follows

    db.inspections.insert(
    {
    "business_name" : "GROCERY INC.",
    "date" : "Feb 20 2015",
    "address" : {
    "street": "MAIN",
    "city": "COLUMBUS"
    }
    }).pretty()

    It would be cool if the ( ) lit up the way the curly brackets do, but with another color.


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/bluefish/tickets/40/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

    <link itemprop="url" href="https://sourceforge.net/p/bluefish/tickets/40/"> <meta itemprop="name" content="View">
    <meta itemprop="description" content="View">
    </oli4@users.sourceforge.net>









     

    Related

    Tickets: #40

  • Dr. Martin Senftleben

    • status: open --> closed
     
  • Dr. Martin Senftleben

    Issue resolved. Closing.

     

Log in to post a comment.

MongoDB Logo MongoDB