This repository has been archived by the owner on Dec 2, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure Taps version of OkJson is used to properly encode data.
Taps uses a customized version of OkJson to exchange data between the client and server. This customized version silently converts symbols to strings as a convience (the original OkJson considers encoding symbols an error since symbols are not a type supported by JSON). Rack started using OkJson also to encode data but kept the original symantics. Since the Taps::Server inherits from Sinatra::Base, and Sinatra::Base includes Rack::Utils, and Rack::Utils is the namespace where Rack's version of OkJson is installed this means the Rack version is now being used by taps instead of the taps version. This means when symbols are encoded an error is generated. To restore the original behavior this patch explicility references the taps version of OkJson. This fixes issue ricardochimal#128.
- Loading branch information