lazy and REST seem to go together :)

Perhaps this will expose my ignorance of laziness/strictness and isn't at all Yesod specific. I have a handler that can serve html or json. When an html request comes in it still executes the json code. I assume this is because the json code uses liftIO. What is the strategy for avoiding executing the json code?