Ruby on Rails Monday, December 31, 2018

On Mon, 31 Dec 2018 at 05:26, fugee ohu <fugee279@gmail.com> wrote:
>
>
>
> On Sunday, December 30, 2018 at 10:56:30 AM UTC-5, Colin Law wrote:
>>
>> On Sun, 30 Dec 2018 at 15:45, fugee ohu <fuge...@gmail.com> wrote:
>> >
>> >
>> >
>> > On Sunday, December 30, 2018 at 8:36:40 AM UTC-5, Colin Law wrote:
>> >>
>> >> On Sun, 30 Dec 2018 at 12:06, fugee ohu <fuge...@gmail.com> wrote:
>> >> > ...
>> >> > It's not json it's javascript so I don't have to run JSON.parse
>> >>
>> >> {"success":true,"code":0,"results":[{"productId":32815555905, ...
>> >> Looks like JSON to me (embedded in js admittedly). You said that the
>> >> data you want is in that string. If that is correct then all you have
>> >> to do is to extract it and parse it as JSON.
>> >>
>> >> Colin
>> >
>> >
>> > It's not json it's javascript
>>
>> What is it about the string
>> {"success":true,"code":0,"results":[{"productId":32815555905, ...
>> that makes it not JSON?
>>
>> Colin
>
>
> The escaped quotes further down the string, you see i left it ending in ... there's more to it i didn't include it's a long string when the parser reaches the first backslash it returns an error

That probably means you have dropped off the end of the json onto
something else, examine that area to see. Is all the data you need in
the bit before that?

Colin

>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d5068ec8-3c81-4d4a-ba0e-70fdda4dff2e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtSfUJgBkfKskW%2BCBn4w3iVs0S8-KtCVwaZJRFE7LhZ2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment