Giter VIP home page Giter VIP logo

Comments (4)

HouzuoGuo avatar HouzuoGuo commented on September 3, 2024

Hello!
That sounds like a great idea.

Let me see if I got it exactly:
The query string will use "?" as parameter placeholders; then by using string manipulation, we remove occurrences of "?" and replace them by parameter values serialized into JSON string.

There should not be ambiguity around "?", it should be simple and straight forward to do so. What's your opinion?

from tiedot.

bnyeggen avatar bnyeggen commented on September 3, 2024

Technically it's the appearance of the raw character ?, outside of a string. So the call:
EvalParameterizedQuery({"eq": "New Go release", "in": [?]}, c, r, "Title")
would render the final JSON as:
{"eq": "New Go release", "in": ["Title"]}

That initial query string isn't valid JSON, so the parse should be unambiguous. It's more complicated to track things like:
{"eq": "New Go release", "in": ["\"?",?]}
where one of the ? appears as part of a valid string which also embeds escaped quotes, and one is an actual parameter stub outside of any strings, but it should be doable.

from tiedot.

HouzuoGuo avatar HouzuoGuo commented on September 3, 2024

That's cool, what would be an easy way to identify ? outside string?

from tiedot.

bnyeggen avatar bnyeggen commented on September 3, 2024

Closed w/ PR 53

from tiedot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.