Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-process Hooks #18

Closed
meson10 opened this issue Sep 19, 2011 · 4 comments
Closed

Pre-process Hooks #18

meson10 opened this issue Sep 19, 2011 · 4 comments

Comments

@meson10
Copy link

meson10 commented Sep 19, 2011

It would be great, if there was a way to "override" or some "pre_process" hook to execute, before default is fired. Currently there is no way this can be acheieved. and pre processing the data before feeding it to simple json, makes it a 2 x Loop.

Basically, Its a collection of objects which need to Inflated using one dynamic variable. The collection is sort of cached, and is kin of large in number.

In the comment update you have mentioned, it will be too overhead to implement.

Is there any other workaround you suggest [ i might have missed in the documentation ]?
I really wish to avoid that 1 extra iteration.

@etrepum
Copy link
Member

etrepum commented Sep 19, 2011

Can you explain your use case better? It's not very clear what you want this for, there may be better ways to do this already.

@etrepum
Copy link
Member

etrepum commented Sep 19, 2011

For example, see #1

@migajek
Copy link

migajek commented Jun 24, 2012

in my case, I'm looking for a way to avoid escaping some specific string values when encoding to JSON.
The reason is because I need to pass function reference (or even the whole function), so it might be not string-escaped.

see this example:
myDict = {
"name": "John",
"age": 21,
"hello": "js:function(){ alert('Hi'); }",
}

what I'd like to see as an output is a JSON object with "hello": function(){ alert('Hi'); }
instead of escaped one.

@etrepum etrepum closed this as completed Jun 24, 2012
@etrepum etrepum reopened this Jun 24, 2012
@etrepum
Copy link
Member

etrepum commented Jun 24, 2012

@migajek that functionality won't be implemented, as the output is no longer JSON.

@meson10 meson10 closed this as completed Jun 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants