# To\_json performing inconsistently

**URL:** <https://www.ruby-forum.com/t/to-json-performing-inconsistently/143316>\
**Category:** Rails\
**Created:** [July 17, 2008, 9:55am UTC](https://www.ruby-forum.com/t/to-json-performing-inconsistently/143316 "2008-07-17T09:55:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![timhunter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/71e660/32.png) [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Post date:** [July 17, 2008, 9:55am UTC](https://www.ruby-forum.com/t/to-json-performing-inconsistently/143316/1 "2008-07-17T09:55:59Z")

</div>

Hi there,

I have two projects, both looking like they use the same version of  
ruby, same version of rails, on the same machine. When I run console  
within each project, the to\_json call returns a different result.

> > ‘’.to\_json  
> > =\> “”\u003Ca href=\"#\" onclick=\"$(this).up(  
> > \u0026quot;.positioned\_promotion\_list\_item\u0026quot;).remove();  
> > return false;\"\u003E""

and

> > ‘’.to\_json  
> > =\> “”\<a href=\"#\" onclick=\"$  
> > (this).up(".positioned\_promotion\_list\_item").remove();  
> > return false;\"\>""

Does anyone know what may be causing this?

Cheers,

Tim.
